org.bouncycastle.mail.smime.util

Class SharedFileInputStream

Implemented Interfaces:
SharedInputStream

public class SharedFileInputStream
extends FilterInputStream
implements SharedInputStream

Constructor Summary

SharedFileInputStream(File file)
SharedFileInputStream(String fileName)

Method Summary

void
dispose()
Close of this stream and any substreams that have been created from it.
long
getPosition()
SharedFileInputStream
getRoot()
Return the shared stream that represents the top most stream that this stream inherits from.
void
mark(int readLimit)
boolean
markSupported()
InputStream
newStream(long start, long finish)
int
read()
int
read(byte[] buf)
int
read(byte[] buf, int off, int len)
void
reset()
long
skip(long n)

Constructor Details

SharedFileInputStream

public SharedFileInputStream(File file)
            throws IOException

SharedFileInputStream

public SharedFileInputStream(String fileName)
            throws IOException

Method Details

dispose

public void dispose()
            throws IOException
Close of this stream and any substreams that have been created from it.

getPosition

public long getPosition()

getRoot

public SharedFileInputStream getRoot()
Return the shared stream that represents the top most stream that this stream inherits from.
Returns:
the base of the shared stream tree.

mark

public void mark(int readLimit)

markSupported

public boolean markSupported()

newStream

public InputStream newStream(long start,
                             long finish)

read

public int read()
            throws IOException

read

public int read(byte[] buf)
            throws IOException

read

public int read(byte[] buf,
                int off,
                int len)
            throws IOException

reset

public void reset()
            throws IOException

skip

public long skip(long n)
            throws IOException