picture.io
Class DiffInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--picture.io.DiffInputStream

public class DiffInputStream
extends java.io.FilterInputStream

Input stream which transforms its data via Differential-Decoding.


Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DiffInputStream(java.io.InputStream in)
          Initialize and set input stream.
 
Method Summary
static void main(java.lang.String[] args)
           
 void mark(int readlimit)
          Do nothing.
 boolean markSupported()
           
 int read()
          Reads and transforms a byte from the underlying input stream.
 int read(byte[] b, int off, int len)
          Reads and transforms a byte array from the underlying input stream.
 void reset()
          Do nothing.
 long skip(long n)
          Skips bytes.
 
Methods inherited from class java.io.FilterInputStream
available, close, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffInputStream

public DiffInputStream(java.io.InputStream in)
Initialize and set input stream.
Method Detail

read

public int read()
         throws java.io.IOException
Reads and transforms a byte from the underlying input stream.
Overrides:
read in class java.io.FilterInputStream
Returns:
tranformed byte or -1 for end of file
Throws:
java.io.IOException -  

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads and transforms a byte array from the underlying input stream. The data is read byte for byte via read() from the underlying input stream.
Overrides:
read in class java.io.FilterInputStream
Parameters:
b - where to write the bytes to
off - starting offset
len - how many bytes to read
Returns:
number of bytes bytes actually read
Throws:
java.io.IOException -  

mark

public void mark(int readlimit)
Do nothing.
Overrides:
mark in class java.io.FilterInputStream

reset

public void reset()
           throws java.io.IOException
Do nothing.
Overrides:
reset in class java.io.FilterInputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.FilterInputStream
Returns:
false

skip

public long skip(long n)
          throws java.io.IOException
Skips bytes.
Overrides:
skip in class java.io.FilterInputStream
Parameters:
n - how many bytes to skip.
Returns:
number of bytes actually skipped
Throws:
java.io.IOException -  

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException