Package com.adobe.internal.io
Class RangedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.adobe.internal.io.CountingInputStream
com.adobe.internal.io.RangedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intread()Reads the next byte of data from this input stream.intread(byte[] b) Reads up to byte.length bytes of data from this input stream into an array of bytes.intread(byte[] b, int off, int len) Reads up to len bytes of data from this input stream into an array of bytes.longskip(long n) Skips over and discards n bytes of data from the input stream.Methods inherited from class com.adobe.internal.io.CountingInputStream
getOffsetMethods inherited from class java.io.FilterInputStream
available, mark, markSupported, resetMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
RangedInputStream
- Parameters:
in-
-
-
Method Details
-
read
Description copied from class:CountingInputStreamReads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.- Overrides:
readin classCountingInputStream- Returns:
- the next byte of data or
-1if the end of stream is reached - Throws:
IOException- if an I/O error occurs
-
read
Description copied from class:CountingInputStreamReads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.- Overrides:
readin classCountingInputStream- Parameters:
b- the buffer into which the data is readoff- the start offset in the buffer to write the datalen- the maximum number of bytes to read- Returns:
- the total number of bytes read into the buffer, or
-1if there is no more data because the end of the stream has been reached. - Throws:
IOException- if an I/O error occurs
-
read
Description copied from class:CountingInputStreamReads up to byte.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.- Overrides:
readin classCountingInputStream- Returns:
- the total number of bytes read into the buffer, or
-1if there is no more data because the end of the stream has been reached. - Throws:
IOException- if an I/O error occurs
-
skip
Description copied from class:CountingInputStreamSkips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.- Overrides:
skipin classCountingInputStream- Parameters:
n- the number of bytes to be skipped- Returns:
- the actual number of bytes skipped
- Throws:
IOException- if an I/O error occurs
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-