public final class InputSubstream extends SdkFilterInputStream
in| 构造器和说明 |
|---|
InputSubstream(InputStream in,
long offset,
long length,
boolean closeSourceStream)
Constructs a new InputSubstream so that when callers start reading from
this stream they'll start at the specified offset in the real stream and
after they've read the specified length, this stream will look empty.
|
public InputSubstream(InputStream in, long offset, long length, boolean closeSourceStream)
in - The input stream to wrap.offset - The offset, in bytes, into the specified input stream at which
to start reading data.length - The length, in bytes, of the specified input stream to return
through this stream.closeSourceStream - True if the wrapped InputStream should be closed when this
InputSubstream is closed.public int read()
throws IOException
read 在类中 FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark 在类中 FilterInputStreampublic void reset()
throws IOException
reset 在类中 FilterInputStreamIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 FilterInputStreamIOExceptionpublic int available()
throws IOException
available 在类中 FilterInputStreamIOExceptionCopyright © 2016-2017. All Rights Reserved.