This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.mail.internet
interface SharedInputStream

All Known Implementing Classes:
SharedByteArrayInputStream, SharedFileInputStream

public interface SharedInputStream

An InputStream that is backed by data that can be shared by multiple readers may implement this interface. This allows users of such an InputStream to determine the current position in the InputStream, and to create new InputStreams representing a subset of the data in the original InputStream. The new InputStream will access the same underlying data as the original, without copying the data.

Note that implementations of this interface must ensure that the close method does not close any underlying stream that might be shared by multiple instances of SharedInputStream until all shared instances have been closed.

See Also (auto-generated):

MimeMessage


Method Summary
 long

          Return the current position in the InputStream, as an offset from the beginning of the InputStream.
 InputStream
newStream(long start, long end)

          Return a new InputStream representing a subset of the data from this InputStream, starting at start (inclusive) up to end (exclusive).
 

Method Detail

getPosition

public long getPosition()
Return the current position in the InputStream, as an offset from the beginning of the InputStream.

Returns:
the current position

newStream

public InputStream newStream(long start,
                             long end)
Return a new InputStream representing a subset of the data from this InputStream, starting at start (inclusive) up to end (exclusive). start must be non-negative. If end is -1, the new stream ends at the same place as this stream. The returned InputStream will also implement the SharedInputStream interface.

Parameters:
start - the starting position
end - the ending position + 1
Returns:
the new stream


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.