net.sourceforge.jtds.jdbc
Class BlobImpl.BlobOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--net.sourceforge.jtds.jdbc.BlobImpl.BlobOutputStream
- Enclosing class:
- BlobImpl
- class BlobImpl.BlobOutputStream
- extends java.io.OutputStream
Class to manage any Blob write.
Method Summary |
private void |
checkSize(long length)
Checks the size of the in-memory buffer; if a write will
cause the size to exceed MAXIMUM_SIZE then
the data will be removed from memory and written to disk. |
void |
close()
|
void |
flush()
|
(package private) void |
updateOuputStream()
Updates the outputStream member by creating the
appropriate type of output stream based upon the current
storage mechanism. |
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
(package private) void |
writeToDisk(java.io.InputStream inputStream)
|
Methods inherited from class java.io.OutputStream |
write |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
outputStream
private java.io.OutputStream outputStream
curPos
private long curPos
securityFailure
private boolean securityFailure
BlobImpl.BlobOutputStream
BlobImpl.BlobOutputStream(long pos,
long length)
throws java.sql.SQLException
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
checkSize
private void checkSize(long length)
throws java.io.IOException
- Checks the size of the in-memory buffer; if a write will
cause the size to exceed
MAXIMUM_SIZE
then
the data will be removed from memory and written to disk.
- Parameters:
length
- the length of data to be written
writeToDisk
void writeToDisk(java.io.InputStream inputStream)
throws java.io.IOException
updateOuputStream
void updateOuputStream()
throws java.io.IOException
- Updates the
outputStream
member by creating the
appropriate type of output stream based upon the current
storage mechanism.
- Throws:
java.io.IOException
- if any failure occured while creating the
output stream
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class java.io.OutputStream
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.OutputStream
Generated on April 15 2005