net.sourceforge.jtds.jdbc
Class ClobImpl.ClobWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--net.sourceforge.jtds.jdbc.ClobImpl.ClobWriter
Enclosing class:
ClobImpl

class ClobImpl.ClobWriter
extends java.io.Writer

Class to manage any Clob write.


Field Summary
(package private)  long curPos
           
(package private)  boolean securityFailure
           
(package private)  java.io.Writer writer
           
 
Fields inherited from class java.io.Writer
lock, writeBuffer, writeBufferSize
 
Constructor Summary
(package private) ClobImpl.ClobWriter(long pos, long length)
           
 
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 updateWriter()
          Updates the outputStream member by creating the approperiate type of output stream based upon the current storage mechanism.
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
(package private)  void writeToDisk(java.io.Reader reader)
           
 
Methods inherited from class java.io.Writer
write, write, write
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

writer

java.io.Writer writer

curPos

long curPos

securityFailure

boolean securityFailure
Constructor Detail

ClobImpl.ClobWriter

ClobImpl.ClobWriter(long pos,
                    long length)
              throws java.sql.SQLException
Method Detail

write

public void write(int c)
           throws java.io.IOException
Overrides:
write in class java.io.Writer

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.Writer

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.Reader reader)
           throws java.io.IOException

updateWriter

void updateWriter()
            throws java.io.IOException
Updates the outputStream member by creating the approperiate type of output stream based upon the current storage mechanism.
Throws:
java.io.IOException - if any failure occure while creating the output stream

flush

public void flush()
           throws java.io.IOException
Overrides:
flush in class java.io.Writer

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.Writer


Generated on April 15 2005