public final class MultipartStream.MultipartItemInputStream extends InputStream implements com.helger.commons.state.ICloseable
InputStream for reading an items contents.| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of bytes, which are currently available, without
blocking.
|
void |
close()
Closes the input stream but NOT the underlying InputStream.
|
void |
close(boolean bCloseUnderlying)
Closes the input stream.
|
long |
getBytesRead()
Returns the number of bytes, which have been read by the stream.
|
boolean |
isClosed()
Returns, whether the stream is closed.
|
int |
read()
Returns the next byte in the stream.
|
int |
read(byte[] aBuf,
int nOfs,
int nLen)
Reads bytes into the given buffer.
|
long |
skip(long nBytes)
Skips the given number of bytes.
|
mark, markSupported, read, resetpublic long getBytesRead()
public int available()
throws IOException
available in class InputStreamIOException - An I/O error occurs.public int read()
throws IOException
read in class InputStreamIOException - An I/O error occurred.public int read(byte[] aBuf,
int nOfs,
int nLen)
throws IOException
read in class InputStreamaBuf - The destination buffer, where to write to.nOfs - Offset of the first byte in the buffer.nLen - Maximum number of bytes to read.IOException - An I/O error occurred.public void close()
throws IOException
close in interface com.helger.commons.state.ICloseableclose in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException - An I/O error occurred.public void close(boolean bCloseUnderlying)
throws IOException
bCloseUnderlying - Whether to close the underlying stream (hard close)IOException - An I/O error occurred.public long skip(long nBytes)
throws IOException
skip in class InputStreamnBytes - Number of bytes to skip.IOException - An I/O error occurred.public boolean isClosed()
isClosed in interface com.helger.commons.state.ICloseableCopyright © 2014–2019 Philip Helger. All rights reserved.