Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.util.jar
Class JarFile.EntryInputStream  view JarFile.EntryInputStream download JarFile.EntryInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.util.jar.JarFile.EntryInputStream
All Implemented Interfaces:
java.io.Closeable
Enclosing class:
JarFile

private static class JarFile.EntryInputStream
extends java.io.FilterInputStream

A utility class that verifies jar entries as they are read.


Field Summary
private  boolean checked
           
private  java.util.zip.ZipEntry entry
           
private  byte[][] hashes
           
private  JarFile jarfile
           
private  long length
           
private  java.security.MessageDigest[] md
           
private  long pos
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
(package private) JarFile.EntryInputStream(java.util.zip.ZipEntry entry, java.io.InputStream in, JarFile jar)
           
 
Method Summary
private  void eof()
           
 void mark(int readLimit)
          Calls the in.mark(int) method.
 boolean markSupported()
          Calls the in.markSupported() method.
 int read()
          Calls the in.read() method
 int read(byte[] buf)
          Calls the read(byte[], int, int) overloaded method.
 int read(byte[] buf, int off, int len)
          Calls the in.read(byte[], int, int) method.
 void reset()
          Calls the in.reset() method.
 long skip(long bytes)
          Calls the in.skip(long) method
 
Methods inherited from class java.io.FilterInputStream
available, close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jarfile

private final JarFile jarfile

length

private final long length

pos

private long pos

entry

private final java.util.zip.ZipEntry entry

hashes

private final byte[][] hashes

md

private final java.security.MessageDigest[] md

checked

private boolean checked
Constructor Detail

JarFile.EntryInputStream

JarFile.EntryInputStream(java.util.zip.ZipEntry entry,
                         java.io.InputStream in,
                         JarFile jar)
                   throws java.io.IOException
Method Detail

markSupported

public boolean markSupported()
Description copied from class: java.io.FilterInputStream
Calls the in.markSupported() method.


mark

public void mark(int readLimit)
Description copied from class: java.io.FilterInputStream
Calls the in.mark(int) method.


reset

public void reset()
Description copied from class: java.io.FilterInputStream
Calls the in.reset() method.


read

public int read()
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read() method


read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read(byte[], int, int) method.


read

public int read(byte[] buf)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the read(byte[], int, int) overloaded method. Note that this method does not redirect its call directly to a corresponding method in in. This allows subclasses to override only the three argument version of read.


skip

public long skip(long bytes)
          throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.skip(long) method


eof

private void eof()
          throws java.io.IOException