Class CipherInputStream<T extends Decrypter>

    • Field Detail

      • decrypter

        private T extends Decrypter decrypter
      • lastReadRawDataCache

        private byte[] lastReadRawDataCache
      • singleByteBuffer

        private byte[] singleByteBuffer
    • Constructor Detail

      • CipherInputStream

        public CipherInputStream​(ZipEntryInputStream zipEntryInputStream,
                                 LocalFileHeader localFileHeader,
                                 char[] password,
                                 int bufferSize,
                                 boolean useUtf8ForPassword)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • 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
      • getLastReadRawDataCache

        public byte[] getLastReadRawDataCache()
      • readRaw

        protected int readRaw​(byte[] b)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • cacheRawData

        private void cacheRawData​(byte[] b,
                                  int len)
      • getDecrypter

        public T getDecrypter()
      • endOfEntryReached

        protected void endOfEntryReached​(java.io.InputStream inputStream,
                                         int numberOfBytesPushedBack)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getNumberOfBytesReadForThisEntry

        protected long getNumberOfBytesReadForThisEntry()
      • initializeDecrypter

        protected abstract T initializeDecrypter​(LocalFileHeader localFileHeader,
                                                 char[] password,
                                                 boolean useUtf8ForPassword)
                                          throws java.io.IOException
        Throws:
        java.io.IOException