|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--com.ibm.as400.access.PrintObjectInputStream
The PrintObjectInputStream class is used to read data out of an AS/400 spooled file or AFP resource such as an overlay or page segment.
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.
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int available() throws java.io.IOException
available
in class java.io.InputStream
public void close() throws java.io.IOException
close
in class java.io.InputStream
java.io.IOException
- If an error occurs while communicating with the AS/400.public void mark(int readLimit)
mark
in class java.io.InputStream
readLimit
- The maximum limit of bytes allowed
to be read before the mark position becomes invalid.public boolean markSupported()
markSupported
in class java.io.InputStream
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- If an error occurs while communicating with the AS/400.public int read(byte[] data) throws java.io.IOException
read
in class java.io.InputStream
data
- The buffer into which the data is read.java.io.IOException
- If an error occurs while communicating with the AS/400.public int read(byte[] data, int dataOffset, int length) throws java.io.IOException
read
in class java.io.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.java.io.IOException
- If an error occurs while communicating with the AS/400.public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
- If an error occurs while communicating with the AS/400.public long skip(long bytesToSkip) throws java.io.IOException
skip
in class java.io.InputStream
bytesToSkip
- The number of bytes to be skipped.java.io.IOException
- If an error occurs while communicating with the AS/400.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |