net.sf.magicproject.network
Class VirtualInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by net.sf.magicproject.network.VirtualInputStream
All Implemented Interfaces:
java.io.Closeable

public class VirtualInputStream
extends java.io.InputStream

Author:
Fabrice Daugan

Constructor Summary
VirtualInputStream()
           
 
Method Summary
 int read()
          As standard read method, if buffer is empty, current thread would be blocked until bytes would be available
 void reset()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualInputStream

public VirtualInputStream()
Method Detail

read

public int read()
         throws java.io.IOException
As standard read method, if buffer is empty, current thread would be blocked until bytes would be available

Specified by:
read in class java.io.InputStream
Returns:
the next available byte
Throws:
java.io.IOException - never throwsn, but inheritence constraint the presence of this tag
See Also:
InputStream.read()

reset

public void reset()
Overrides:
reset in class java.io.InputStream


Copyright © 2003-2007 Magic-Project. All Rights Reserved.