de.schlichtherle.truezip.io
Class DecoratingInputStream
java.lang.Object
java.io.InputStream
de.schlichtherle.truezip.io.DecoratingInputStream
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- ConcurrentInputShop.ConcurrentInputStream, FsStatistics.CountingInputStream, IOCache.Buffer.BufferInputStream, LazyInputSocket.ProxyInputStream, SynchronizedInputStream
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public abstract class DecoratingInputStream
- extends InputStream
An abstract decorator for an input stream.
This is a clean room implementation of its cousin FilterInputStream
in the JSE, but optimized for performance and without
multithreading support.
- Author:
- Christian Schlichtherle
- See Also:
DecoratingOutputStream
delegate
@Nullable
protected InputStream delegate
- The nullable decorated input stream.
DecoratingInputStream
protected DecoratingInputStream(@CheckForNull
InputStream in)
- Constructs a new filter input stream.
- Parameters:
in - the input stream to wrap in this decorator.
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public final int read(byte[] b)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
mark
public void mark(int readlimit)
- Overrides:
mark in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
toString
public String toString()
- Returns a string representation of this object for debugging and logging
purposes.
- Overrides:
toString in class Object
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.