palmed.edit.text
Class MultiInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by palmed.edit.text.MultiInputStream
All Implemented Interfaces:
java.io.Closeable

public final class MultiInputStream
extends java.io.InputStream

This class provides a means to split a stream into chunks.

Version:
$Revision$ $Date$
Author:
Mathieu Champlon

Constructor Summary
MultiInputStream(java.io.InputStream stream, int size)
          Create a multi input stream.
 
Method Summary
 int available()
          
 void close()
          
 boolean markSupported()
          
 void next()
          Move to next chunk.
 int read()
          
 int read(byte[] b)
          
 int read(byte[] b, int off, int len)
          
 
Methods inherited from class java.io.InputStream
mark, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiInputStream

public MultiInputStream(java.io.InputStream stream,
                        int size)
Create a multi input stream.

Parameters:
stream - the stream
size - the size of each chunk
Method Detail

read

public int read()
         throws java.io.IOException

Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException

Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException

Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException

Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

markSupported

public boolean markSupported()

Overrides:
markSupported in class java.io.InputStream

next

public void next()
Move to next chunk.



Copyright © 2004-2006 PalmEd. All Rights Reserved.