JXTA

net.jxta.util
Class MarkProhibitedFilterStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by net.jxta.util.MarkProhibitedFilterStream
All Implemented Interfaces:
Closeable

public class MarkProhibitedFilterStream
extends FilterInputStream

Implements a filter which disables the mark() feature of an input stream. Useful for when the stream is shared.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
MarkProhibitedFilterStream(InputStream in)
          Creates a new instance of MarkProhibitedFilterStream
 
Method Summary
 void mark(int readlimit)
          

This method does nothing.

 boolean markSupported()
          

This method simply returns false.

 void reset()
          

This implementation always throws IOException since mark is not supported.

 
Methods inherited from class java.io.FilterInputStream
available, close, read, read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkProhibitedFilterStream

public MarkProhibitedFilterStream(InputStream in)
Creates a new instance of MarkProhibitedFilterStream

Parameters:
in - the stream which will be limited.
Method Detail

mark

public void mark(int readlimit)

This method does nothing.

Overrides:
mark in class FilterInputStream

reset

public void reset()
           throws IOException

This implementation always throws IOException since mark is not supported.

Overrides:
reset in class FilterInputStream
Throws:
IOException

markSupported

public boolean markSupported()

This method simply returns false.

Overrides:
markSupported in class FilterInputStream

JXSE