MultipartEntry content in the character mode.
| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private CharsetDecoder | |
| private String | |
| private ReadHandler | |
| private boolean | |
| private final MultipartEntry | |
| private int | |
| private NIOInputStream | |
| private final CharBuffer | singleCharBuf
|
| Access | Constructor and Description |
|---|---|
| public | MultipartEntryNIOReader(final MultipartEntry
MultipartEntry the {@link NIOInputStream belongs to.Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. Closes the stream and releases any system resources associated with it. |
| private int | Returns: the number of bytes actually readhow much content should attempt to be read requestedLen, final CharBuffer dst)Used to convert bytes to char. |
| private CharsetDecoder | getDecoder()
Returns: the |
| protected void | |
| public boolean | |
| public boolean | |
| public void | |
| public boolean | Returns: falseOverrides java. This |
| public void | notifyAvailable(final ReadHandler handler)
Implements org.
Notify the specified |
| public void | notifyAvailable(final ReadHandler handler, final int size)
Implements org.
Notify the specified |
| pack-priv void | |
| public int | read(final CharBuffer target)
Overrides java. Implements java. Attempts to read characters into the specified character buffer. |
| public int | |
| public int | |
| public int | read(final char[] cbuf, final int off, final int len)
Implements abstract java. Reads characters into a portion of an array. |
| public boolean | |
| public int | |
| protected void | |
| public void | |
| private static boolean | shouldNotifyNow(final int
the amount of data that must be available for a size, final int ReadHandler to be notified.the amount of data currently available. available)Returns: |
| public long |
| averageCharsPerByte | back to summary |
|---|---|
| private float averageCharsPerByte | |
| decoder | back to summary |
|---|---|
| private CharsetDecoder decoder | |
| encoding | back to summary |
|---|---|
| private String encoding | |
| handler | back to summary |
|---|---|
| private ReadHandler handler | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| multipartEntry | back to summary |
|---|---|
| private final MultipartEntry multipartEntry | |
| requestedSize | back to summary |
|---|---|
| private int requestedSize | |
| requestNIOInputStream | back to summary |
|---|---|
| private NIOInputStream requestNIOInputStream | |
| singleCharBuf | back to summary |
|---|---|
| private final CharBuffer singleCharBuf
| |
| MultipartEntryNIOReader | back to summary |
|---|---|
| public MultipartEntryNIOReader(final MultipartEntry multipartEntry) Constructs a new
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
| |
| fillChar | back to summary |
|---|---|
| private int fillChar(final int requestedLen, final CharBuffer dst) throws IOException Used to convert bytes to char.
| |
| getDecoder | back to summary |
|---|---|
private CharsetDecoder getDecoder()
| |
| initialize | back to summary |
|---|---|
| protected void initialize(final NIOInputStream requestInputStream, final String encoding) | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() Implements org.
| |
| isReady | back to summary |
|---|---|
| public boolean isReady() Implements org.
| |
| mark | back to summary |
|---|---|
| public void mark(int readAheadLimit) throws IOException Overrides java. Doc from java. Marks the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. This
| |
| notifyAvailable | back to summary |
|---|---|
| public void notifyAvailable(final ReadHandler handler) Implements org. Doc from org.
Notify the specified Invoking this method is equivalent to calling: notifyAvailable(handler, 1).
| |
| notifyAvailable | back to summary |
|---|---|
| public void notifyAvailable(final ReadHandler handler, final int size) Implements org. Doc from org.
Notify the specified
| |
| onDataCame | back to summary |
|---|---|
| pack-priv void onDataCame() Append available bytes to the input stream | |
| read | back to summary |
|---|---|
| public int read(final CharBuffer target) throws IOException Overrides java. Implements java. Doc from java. Attempts to read characters into the specified character buffer. The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed. If the length of the specified character buffer is zero, then no characters will be read and zero will be returned.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(final char[] cbuf) throws IOException Overrides java. Doc from java. Reads characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If the length of
| |
| read | back to summary |
|---|---|
| public int read(final char[] cbuf, final int off, final int len) throws IOException Implements abstract java. Doc from java. Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If
| |
| ready | back to summary |
|---|---|
| public boolean ready() throws IOException Overrides java. Doc from java. Tells whether this stream is ready to be read.
| |
| readyData | back to summary |
|---|---|
| public int readyData() Implements org.
| |
| recycle | back to summary |
|---|---|
| protected void recycle() | |
| reset | back to summary |
|---|---|
| public void reset() throws IOException Overrides java. Doc from java. Resets the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
| |
| shouldNotifyNow | back to summary |
|---|---|
private static boolean shouldNotifyNow(final int size, final int available)
| |
| skip | back to summary |
|---|---|
| public long skip(final long n) throws IOException Overrides java. Doc from java. Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.
| |