Closeable
, AutoCloseable
public class PrintObjectInputStream extends InputStream
An instance of this class can be created either by using the getInputStream method from the AFPResource class or by using the getInputStream method from the SpooledFile class.
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
Returns the number of bytes that can be read without blocking.
|
void |
close() |
Closes the input stream.
|
void |
mark(int readLimit) |
Marks the current position in the input stream.
|
boolean |
markSupported() |
Returns a boolean indicating whether this stream type
supports mark/reset.
|
int |
read() |
Reads the next byte of data from this input stream.
|
int |
read(byte[] data) |
Reads up to data.length bytes of data from this
input stream into data.
|
int |
read(byte[] data,
int dataOffset,
int length) |
Reads up to length bytes of data from this input stream
into data, starting at the array offset dataOffset.
|
void |
reset() |
Repositions the stream to the last marked position.
|
long |
skip(long bytesToSkip) |
Skips over the next bytesToSkip bytes in the stream.
|
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class InputStream
IOException
- If an error occurs while communicating with the system.public void mark(int readLimit)
mark
in class InputStream
readLimit
- The maximum limit of bytes allowed
to be read before the mark position becomes invalid.public boolean markSupported()
markSupported
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
- If an error occurs while communicating with the system.public int read(byte[] data) throws IOException
read
in class InputStream
data
- The buffer into which the data is read.IOException
- If an error occurs while communicating with the system.public int read(byte[] data, int dataOffset, int length) throws IOException
read
in class InputStream
data
- The buffer into which the data is read.dataOffset
- The start offset of the data.length
- The maximum number of bytes to read.IOException
- If an error occurs while communicating with the system.public void reset() throws IOException
reset
in class InputStream
IOException
- If an error occurs while communicating with the system.public long skip(long bytesToSkip) throws IOException
skip
in class InputStream
bytesToSkip
- The number of bytes to be skipped.IOException
- If an error occurs while communicating with the system.Copyright © 2024. All rights reserved.