net.sourceforge.jtds.util
Class BlobBuffer.BlobOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended bynet.sourceforge.jtds.util.BlobBuffer.BlobOutputStream
Enclosing class:
BlobBuffer

private class BlobBuffer.BlobOutputStream
extends java.io.OutputStream

Implements an OutputStream for BLOB data.


Field Summary
private  boolean open
           
private  int writePtr
           
 
Constructor Summary
(package private) BlobBuffer.BlobOutputStream(long pos)
          Costructs an OutputStream object over the BLOB buffer.
 
Method Summary
 void close()
          Close the output stream.
protected  void finalize()
          Ensures underlying BLOB file can be closed even if user does not close this stream.
 void write(byte[] bytes, int offset, int len)
          Write bytes to the BLOB buffer.
 void write(int b)
          Write a byte to the BLOB buffer.
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writePtr

private int writePtr

open

private boolean open
Constructor Detail

BlobBuffer.BlobOutputStream

BlobBuffer.BlobOutputStream(long pos)
                      throws java.io.IOException
Costructs an OutputStream object over the BLOB buffer.

Parameters:
pos - the starting position (from 0)
Throws:
java.io.IOException - if an I/O error occurs
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Ensures underlying BLOB file can be closed even if user does not close this stream.

Throws:
java.lang.Throwable

write

public void write(int b)
           throws java.io.IOException
Write a byte to the BLOB buffer.

Parameters:
b - the byte value to write
Throws:
java.io.IOException - if an I/O error occurs

write

public void write(byte[] bytes,
                  int offset,
                  int len)
           throws java.io.IOException
Write bytes to the BLOB buffer.

Parameters:
bytes - the byte array value to write
offset - the start position in the byte array
len - the number of bytes to write
Throws:
java.io.IOException - if an I/O error occurs

close

public void close()
           throws java.io.IOException
Close the output stream.

Throws:
java.io.IOException - if an I/O error occurs


Generated on October 27 2012