com.objsys.asn1j.runtime
Interface Asn1InputStream

All Known Implementing Classes:
Asn1BerInputStream, Asn1CerInputStream, Asn1DerInputStream, Asn1MderDecodeBuffer, Asn1PerInputStream

public interface Asn1InputStream

This interface is a base interface for all classes, which implement an input stream functionality for decoding.


Method Summary
 int available()
          Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
 void close()
          Closes this input stream and releases any system resources associated with the stream.
 void mark(int readLimit)
          This method is used to mark the current position in the input stream for retry processing.
 boolean markSupported()
          Tests if this input stream supports the mark and reset methods.
 void reset()
          This method is used to reset the current position in the input stream back to the location of the last 'mark' call.
 long skip(long nbytes)
          This method will skip over the requested number of bytes in the input stream.
 

Method Detail

available

int available()
              throws java.io.IOException
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or or another thread.

Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
java.io.IOException - if an I/O error occurs.

close

void close()
           throws java.io.IOException
Closes this input stream and releases any system resources associated with the stream.

Throws:
java.io.IOException - if an I/O error occurs.

mark

void mark(int readLimit)
This method is used to mark the current position in the input stream for retry processing. It is equivalent to the Java InputStream 'mark' method.

Parameters:
readLimit - Max number of bytes that can be read before mark becomes invalid.

markSupported

boolean markSupported()
Tests if this input stream supports the mark and reset methods. The markSupported method of InputStream returns false.

Returns:
true if this true type supports the mark and reset method; false otherwise.

reset

void reset()
This method is used to reset the current position in the input stream back to the location of the last 'mark' call. It is equivalent to the Java InputStream 'reset' method.


skip

long skip(long nbytes)
          throws java.io.IOException
This method will skip over the requested number of bytes in the input stream.

Parameters:
nbytes - Number of bytes to skip
Throws:
java.io.IOException - if an I/O error occurs.