Class ChunkInputStream

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

    final class ChunkInputStream
    extends java.io.InputStream
    Constructs a InputStream from a linked list of Chunks.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) byte[] buf  
      (package private) Chunk current  
      (package private) int len  
      (package private) MIMEMessage msg  
      (package private) int offset  
      (package private) MIMEPart part  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private boolean fetch()
      Gets to the next chunk if we are done with the current one.
      int read()  
      int read​(byte[] b, int off, int sz)  
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • read

        public int read​(byte[] b,
                        int off,
                        int sz)
        Overrides:
        read in class java.io.InputStream
      • read

        public int read()
        Specified by:
        read in class java.io.InputStream
      • fetch

        private boolean fetch()
        Gets to the next chunk if we are done with the current one.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException