com.ibm.as400.access

Class PrintObjectTransformedInputStream

  • java.lang.Object
    • java.io.InputStream
      • com.ibm.as400.access.PrintObjectTransformedInputStream
  • All Implemented Interfaces:
    java.io.Closeable


    public class PrintObjectTransformedInputStream
    extends java.io.InputStream
    Reads transformed data from a system 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.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int available()
      Returns the number of bytes available (with blocking).
      void close()
      Closes the input stream and releases any resources associated with it.
      boolean markSupported()
      Returns a boolean indicating whether this stream type supports mark and 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 the 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.
      long skip(long bytesToSkip)
      Skips over the next bytesToSkip bytes in the stream.
      • Methods inherited from class java.io.InputStream

        mark, reset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • available

        public int available()
                      throws java.io.IOException
        Returns the number of bytes available (with blocking).
        Overrides:
        available in class java.io.InputStream
        Returns:
        The number of available bytes (with blocking).
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Closes the input stream and releases any resources associated with it.
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException - If an error occurs while communicating with the system.
      • markSupported

        public boolean markSupported()
        Returns a boolean indicating whether this stream type supports mark and reset.
        Overrides:
        markSupported in class java.io.InputStream
        Returns:
        Always false. Objects of this class will not support the mark and reset methods.
      • read

        public int read()
                 throws java.io.IOException
        Reads the next byte of data from this input stream.
        Specified by:
        read in class java.io.InputStream
        Returns:
        The byte read, or -1 if the end of the stream is reached.
        Throws:
        java.io.IOException - If an error occurs while communicating with the system.
      • read

        public int read(byte[] data)
                 throws java.io.IOException
        Reads up to data.length bytes of data from the input stream into data.
        Overrides:
        read in class java.io.InputStream
        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:
        java.io.IOException - If an error occurs while communicating with the system.
      • read

        public int read(byte[] data,
               int dataOffset,
               int length)
                 throws java.io.IOException
        Reads up to length bytes of data from this input stream into data, starting at the array offset dataOffset.
        Overrides:
        read in class java.io.InputStream
        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:
        java.io.IOException - If an error occurs while communicating with the system.
      • skip

        public long skip(long bytesToSkip)
                  throws java.io.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.
        Overrides:
        skip in class java.io.InputStream
        Parameters:
        bytesToSkip - The number of bytes to be skipped.
        Returns:
        The actual number of bytes skipped.
        Throws:
        java.io.IOException - If an error occurs while communicating with the system.