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, getEncodingName
public StreamBufferManager(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public java.nio.CharBuffer getCharBuffer()
getCharBuffer
in class BufferManager
public boolean getMore() throws java.io.IOException
getMore
in class BufferManager
java.io.IOException
CharBuffer.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.IOException
public static void main(java.lang.String[] args)
public void close() throws java.io.IOException
close
in class BufferManager
java.io.IOException
public void setEncoding(java.lang.String encoding) throws java.io.IOException
setEncoding
in class BufferManager
java.io.IOException
public boolean arrangeCapacity(int length) throws java.io.IOException
BufferManager
arrangeCapacity
in class BufferManager
java.io.IOException
Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.