Class ASCII85InputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    final class ASCII85InputStream
    extends java.io.FilterInputStream
    This class represents an ASCII85 stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] ascii  
      private byte[] b  
      private boolean eof  
      private int index  
      private int n  
      private static char NEWLINE  
      private static char OFFSET  
      private static char PADDING_U  
      private static char RETURN  
      private static char SPACE  
      private static char TERMINATOR  
      private static char Z  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      ASCII85InputStream​(java.io.InputStream is)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()
      Unsupported.
      void close()
      This will close the underlying stream and release any resources.
      void mark​(int readlimit)
      Unsupported.
      boolean markSupported()
      non supported interface methods.
      int read()
      This will read the next byte from the stream.
      int read​(byte[] data, int offset, int len)
      This will read a chunk of data.
      void reset()
      Unsupported.
      long skip​(long nValue)
      Unsupported.
      • Methods inherited from class java.io.FilterInputStream

        read
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • ASCII85InputStream

        ASCII85InputStream​(java.io.InputStream is)
        Constructor.
        Parameters:
        is - The input stream to actually read from.
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        This will read the next byte from the stream.
        Overrides:
        read in class java.io.FilterInputStream
        Returns:
        The next byte read from the stream.
        Throws:
        java.io.IOException - If there is an error reading from the wrapped stream.
      • read

        public int read​(byte[] data,
                        int offset,
                        int len)
                 throws java.io.IOException
        This will read a chunk of data.
        Overrides:
        read in class java.io.FilterInputStream
        Parameters:
        data - The buffer to write data to.
        offset - The offset into the data stream.
        len - The number of byte to attempt to read.
        Returns:
        The number of bytes actually read.
        Throws:
        java.io.IOException - If there is an error reading data from the underlying stream.
      • close

        public void close()
                   throws java.io.IOException
        This will close the underlying stream and release any resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterInputStream
        Throws:
        java.io.IOException - If there is an error closing the underlying stream.
      • markSupported

        public boolean markSupported()
        non supported interface methods.
        Overrides:
        markSupported in class java.io.FilterInputStream
        Returns:
        False always.
      • skip

        public long skip​(long nValue)
        Unsupported.
        Overrides:
        skip in class java.io.FilterInputStream
        Parameters:
        nValue - ignored.
        Returns:
        Always zero.
      • available

        public int available()
        Unsupported.
        Overrides:
        available in class java.io.FilterInputStream
        Returns:
        Always zero.
      • mark

        public void mark​(int readlimit)
        Unsupported.
        Overrides:
        mark in class java.io.FilterInputStream
        Parameters:
        readlimit - ignored.
      • reset

        public void reset()
                   throws java.io.IOException
        Unsupported.
        Overrides:
        reset in class java.io.FilterInputStream
        Throws:
        java.io.IOException - telling that this is an unsupported action.