Class MultipartStream.ItemInputStream
java.lang.Object
java.io.InputStream
org.apache.tomcat.util.http.fileupload.MultipartStream.ItemInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Closeable
- Enclosing class:
- MultipartStream
An 
InputStream for reading an items contents.- 
Method SummaryModifier and TypeMethodDescriptionintReturns the number of bytes, which are currently available, without blocking.voidclose()Closes the input stream.voidclose(boolean pCloseUnderlying) Closes the input stream.longReturns the number of bytes, which have been read by the stream.booleanisClosed()Returns, whether the stream is closed.intread()Returns the next byte in the stream.intread(byte[] b, int off, int len) Reads bytes into the given buffer.longskip(long bytes) Skips the given number of bytes.Methods inherited from class java.io.InputStreammark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
- 
Method Details- 
getBytesReadpublic long getBytesRead()Returns the number of bytes, which have been read by the stream.- Returns:
- Number of bytes, which have been read so far.
 
- 
availableReturns the number of bytes, which are currently available, without blocking.- Overrides:
- availablein class- InputStream
- Returns:
- Number of bytes in the buffer.
- Throws:
- IOException- An I/O error occurs.
 
- 
readReturns the next byte in the stream.- Specified by:
- readin class- InputStream
- Returns:
- The next byte in the stream, as a non-negative integer, or -1 for EOF.
- Throws:
- IOException- An I/O error occurred.
 
- 
readReads bytes into the given buffer.- Overrides:
- readin class- InputStream
- Parameters:
- b- The destination buffer, where to write to.
- off- Offset of the first byte in the buffer.
- len- Maximum number of bytes to read.
- Returns:
- Number of bytes, which have been actually read, or -1 for EOF.
- Throws:
- IOException- An I/O error occurred.
 
- 
closeCloses the input stream.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException- An I/O error occurred.
 
- 
closeCloses the input stream.- Parameters:
- pCloseUnderlying- Whether to close the underlying stream (hard close)
- Throws:
- IOException- An I/O error occurred.
 
- 
skipSkips the given number of bytes.- Overrides:
- skipin class- InputStream
- Parameters:
- bytes- Number of bytes to skip.
- Returns:
- The number of bytes, which have actually been skipped.
- Throws:
- IOException- An I/O error occurred.
 
- 
isClosedpublic boolean isClosed()Returns, whether the stream is closed.
 
-