public class StreamBufferManager extends BufferManager
| Modifier and Type | Class and Description |
|---|---|
protected class |
StreamBufferManager.RewindableInputStream |
endOfStream| Constructor and Description |
|---|
StreamBufferManager(java.io.InputStream stream,
java.lang.String encoding)
Creates a new instance of StreamBufferManager
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
arrangeCapacity(int length)
xxx: This should be an abstract method because in StreamBufferManager
CharBuffer capacity doesn't grow
|
void |
close() |
protected java.io.Reader |
createReader(java.io.InputStream inputStream,
java.lang.String encoding,
java.lang.Boolean isBigEndian)
Creates a reader capable of reading the given input stream in
the specified encoding.
|
java.nio.CharBuffer |
getCharBuffer() |
boolean |
getMore()
This function returns true if some character data was loaded.
|
static void |
main(java.lang.String[] args) |
void |
setEncoding(java.lang.String encoding) |
endOfStream, getBufferManager, getEncodingNamepublic StreamBufferManager(java.io.InputStream stream,
java.lang.String encoding)
throws java.io.IOException
java.io.IOExceptionpublic java.nio.CharBuffer getCharBuffer()
getCharBuffer in class BufferManagerpublic boolean getMore()
throws java.io.IOException
getMore in class BufferManagerjava.io.IOExceptionCharBuffer.compact()protected java.io.Reader createReader(java.io.InputStream inputStream,
java.lang.String encoding,
java.lang.Boolean isBigEndian)
throws java.io.IOException
inputStream - The input stream.encoding - The encoding name that the input stream is
encoded using. If the user has specified that
Java encoding names are allowed, then the
encoding name may be a Java encoding name;
otherwise, it is an ianaEncoding name.isBigEndian - For encodings (like uCS-4), whose names cannot
specify a byte order, this tells whether the order is bigEndian. null menas
unknown or not relevant.java.io.IOExceptionpublic static void main(java.lang.String[] args)
public void close()
throws java.io.IOException
close in class BufferManagerjava.io.IOExceptionpublic void setEncoding(java.lang.String encoding)
throws java.io.IOException
setEncoding in class BufferManagerjava.io.IOExceptionpublic boolean arrangeCapacity(int length)
throws java.io.IOException
BufferManagerarrangeCapacity in class BufferManagerjava.io.IOExceptionCopyright ? 2002-2003 Apache XML Project. All Rights Reserved.