net.sourceforge.jtds.util

Class BlobBuffer.BlobOutputStream

Enclosing Class:
BlobBuffer

private class BlobBuffer.BlobOutputStream
extends OutputStream

Implements an OutputStream for BLOB data.

Field Summary

private boolean
open
private int
writePtr

Constructor Summary

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.

Field Details

open

private boolean open

writePtr

private int writePtr

Constructor Details

BlobOutputStream

(package private)  BlobOutputStream(long pos)
            throws IOException
Costructs an OutputStream object over the BLOB buffer.
Parameters:
pos - the starting position (from 0)

Method Details

close

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

finalize

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

write

public void write(byte[] bytes,
                  int offset,
                  int len)
            throws 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

write

public void write(int b)
            throws IOException
Write a byte to the BLOB buffer.
Parameters:
b - the byte value to write

Generated on June 12 2008