All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.access.PrintObjectTransformedInputStream
java.lang.Object
|
+----java.io.InputStream
|
+----com.ibm.as400.access.PrintObjectTransformedInputStream
- public class PrintObjectTransformedInputStream
- extends InputStream
The PrintObjectTransformedInputStream class is used to read transformed data
from an AS/400 spooled file. The type of transform to be performed on the data
is dependent on the
PrintParameterList
used to create an instance of the class.
An instance of this class is created using
the getTransformedInputStream method
from the class SpooledFile.
NOTE: This class is supported on OS/400 V4R4 or later.
Not all spooled file formats are supported for transform.
-
available()
- Returns the number of bytes available (with blocking).
-
close()
- Closes the input stream and releases any resources associated with it.
-
markSupported()
- Returns a boolean indicating whether this stream type supports mark and reset.
-
read()
- Reads the next byte of data from this input stream.
-
read(byte[])
- Reads up to data.length bytes of data from the input
stream into data.
-
read(byte[], int, int)
- Reads up to length bytes of data from this input stream into data,
starting at the array offset dataOffset.
-
skip(long)
- Skips over the next bytesToSkip bytes in the stream.
available
public int available() throws IOException
- Returns the number of bytes available (with blocking).
- Returns:
- The number of available bytes (with blocking).
- Overrides:
- available in class InputStream
close
public void close() throws IOException
- Closes the input stream and releases any resources associated with it.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
- Overrides:
- close in class InputStream
markSupported
public boolean markSupported()
- Returns a boolean indicating whether this stream type supports mark and reset.
- Returns:
- Always false. Objects of this class will not support the mark and reset methods.
- Overrides:
- markSupported in class InputStream
read
public int read() throws IOException
- Reads the next byte of data from this input stream.
- Returns:
- The byte read, or -1 if the end of the stream is reached.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
- Overrides:
- read in class InputStream
read
public int read(byte data[]) throws IOException
- Reads up to data.length bytes of data from the input
stream into data.
- Parameters:
- data - The buffer into which the data is read.
- Returns:
- The total number of bytes read into the buffer or -1 if there is no more
data because the end of file has been reached.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
- Overrides:
- read in class InputStream
read
public int read(byte data[],
int dataOffset,
int length) throws IOException
- Reads up to length bytes of data from this input stream into data,
starting at the array offset dataOffset.
- Parameters:
- data - The buffer into which the data is read.
- dataOffset - The start offset of the data.
- length - The maximum number of bytes to read.
- Returns:
- The total number of bytes read into the buffer, or -1 if there is
no more data because the end of file has been reached.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
- Overrides:
- read in class InputStream
skip
public long skip(long bytesToSkip) throws IOException
- Skips over the next bytesToSkip bytes in the stream.
This method may skip less bytes than specified if the end of
the data block is reached. The actual number of bytes skipped is returned.
No action is taken if the number of bytes to skip is not positive.
- Parameters:
- bytesToSkip - The number of bytes to be skipped.
- Returns:
- The actual number of bytes skipped.
- Throws: IOException
- If an error occurs while communicating with the AS/400.
- Overrides:
- skip in class InputStream
All Packages Class Hierarchy This Package Previous Next Index