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

Quick Search    Search Deep

gnu.javax.crypto.keyring
Class MeteredInputStream  view MeteredInputStream download MeteredInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bygnu.javax.crypto.keyring.MeteredInputStream
All Implemented Interfaces:
java.io.Closeable

final class MeteredInputStream
extends java.io.FilterInputStream


Field Summary
private  int count
           
private  int limit
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
(package private) MeteredInputStream(java.io.InputStream in, int limit)
           
 
Method Summary
 int available()
          Calls the in.available() method.
 void close()
          This method closes the input stream by closing the input stream that this object is filtering.
 boolean limitReached()
          Tests if the number of bytes read has reached the limit.
 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 len)
          Calls the in.skip(long) method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

private int count

limit

private final int limit
Constructor Detail

MeteredInputStream

MeteredInputStream(java.io.InputStream in,
                   int limit)
Method Detail

limitReached

public boolean limitReached()
Tests if the number of bytes read has reached the limit.


available

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


close

public void close()
           throws java.io.IOException
Description copied from class: java.io.FilterInputStream
This method closes the input stream by closing the input stream that this object is filtering. Future attempts to access this stream may throw an exception.


mark

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


markSupported

public boolean markSupported()
Description copied from class: java.io.FilterInputStream
Calls the in.markSupported() 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)
         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.


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.


reset

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


skip

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