soot.util
Class SootInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--soot.util.SootInputStream
Direct Known Subclasses:
BafInputStream, ClassInputStream, JimpleInputStream

public abstract class SootInputStream
extends java.io.InputStream

Abstract class underlying all instances of InputStreams. SootInputStreams are used to fetch data from some external source, like class files or jimple files.


Constructor Summary
SootInputStream(java.io.InputStream istream)
          Constructs a SootInputStream from the given InputStream.
 
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)
          Marks the current position in this input stream.
 boolean markSupported()
          Tests if this input stream supports the mark and reset methods.
 int read()
          Reads the next byte of data from the input stream.
 int read(byte[] b)
          Reads some number of bytes from the input stream and stores them into the buffer array b.
 int read(byte[] b, int off, int len)
          Reads up to len bytes of data from the input stream into an array of bytes.
 void reset()
          Repositions this stream to the position at the time the mark method was last called on this input stream.
 long skip(long n)
          Skips over and discards n bytes of data from this input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SootInputStream

public SootInputStream(java.io.InputStream istream)
Constructs a SootInputStream from the given InputStream.
Method Detail

available

public 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.
Overrides:
available in class java.io.InputStream

close

public void close()
           throws java.io.IOException
Closes this input stream and releases any system resources associated with the stream.
Overrides:
close in class java.io.InputStream

mark

public void mark(int readlimit)
Marks the current position in this input stream.
Overrides:
mark in class java.io.InputStream

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods.
Overrides:
markSupported in class java.io.InputStream

read

public int read()
         throws java.io.IOException
Reads the next byte of data from the input stream.
Overrides:
read in class java.io.InputStream

read

public int read(byte[] b)
         throws java.io.IOException
Reads some number of bytes from the input stream and stores them into the buffer array b.
Overrides:
read in class java.io.InputStream

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads up to len bytes of data from the input stream into an array of bytes.
Overrides:
read in class java.io.InputStream

reset

public void reset()
           throws java.io.IOException
Repositions this stream to the position at the time the mark method was last called on this input stream.
Overrides:
reset in class java.io.InputStream

skip

public long skip(long n)
          throws java.io.IOException
Skips over and discards n bytes of data from this input stream.
Overrides:
skip in class java.io.InputStream