org.apache.derby.impl.jdbc
Class ReaderToUTF8Stream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.apache.derby.impl.jdbc.ReaderToUTF8Stream

final class ReaderToUTF8Stream
extends java.io.InputStream

Converts a java.io.Reader to the on-disk UTF8 format used by Cloudscape.


Field Summary
private  int blen
           
private  int boff
           
private  byte[] buffer
           
private static int BUFSIZE
           
private  boolean eof
           
private  boolean multipleBuffer
           
private  LimitReader reader
           
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
(package private) ReaderToUTF8Stream(LimitReader reader)
           
 
Method Summary
 int available()
          Return an optimized version of bytes available to read from the stream Note, it is not exactly per java.io.InputStream#available()
private  void checkSufficientData()
          JDBC 3.0 (from tutorial book) requires that an input stream has the correct number of bytes in the stream.
 void close()
           
private  void fillBuffer(int startingOffset)
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

private LimitReader reader

buffer

private byte[] buffer

boff

private int boff

blen

private int blen

eof

private boolean eof

multipleBuffer

private boolean multipleBuffer

BUFSIZE

private static final int BUFSIZE
See Also:
Constant Field Values
Constructor Detail

ReaderToUTF8Stream

ReaderToUTF8Stream(LimitReader reader)
Method Detail

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

fillBuffer

private void fillBuffer(int startingOffset)
                 throws java.io.IOException
Throws:
java.io.IOException

checkSufficientData

private void checkSufficientData()
                          throws java.io.IOException
JDBC 3.0 (from tutorial book) requires that an input stream has the correct number of bytes in the stream.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

available

public final int available()
Return an optimized version of bytes available to read from the stream Note, it is not exactly per java.io.InputStream#available()


Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.