| java.lang.Object java.io.InputStream com.sun.cldc.io.ResourceInputStream
ResourceInputStream | public class ResourceInputStream extends InputStream (Code) | | Input stream class for accessing resource files in classpath.
|
Constructor Summary | |
public | ResourceInputStream(String name) Construct a resource input stream for accessing objects in the jar file.
Parameters: name - the name of the resource in classpath to access. |
Method Summary | |
public int | available() Gets the number of bytes remaining to be read. | public void | close() | public void | mark(int readlimit) Remembers current position in ResourceInputStream so that
subsequent call to reset will rewind the stream
to the saved position. | public boolean | markSupported() | public int | read() Reads the next byte of data from the input stream. | public int | read(byte b, int off, int len) Reads bytes into a byte array.
Parameters: b - the buffer to read into. Parameters: off - offset to start at in the buffer. Parameters: len - number of bytes to read. | public void | reset() Repositions this stream to the position at the time the
mark method was last called on this input stream. |
ResourceInputStream | public ResourceInputStream(String name) throws IOException(Code) | | Construct a resource input stream for accessing objects in the jar file.
Parameters: name - the name of the resource in classpath to access. Thename must not have a leading '/'. exception: IOException - if an I/O error occurs. |
available | public int available() throws IOException(Code) | | Gets the number of bytes remaining to be read.
the number of bytes remaining in the resource. exception: IOException - if an I/O error occurs. |
mark | public void mark(int readlimit)(Code) | | Remembers current position in ResourceInputStream so that
subsequent call to reset will rewind the stream
to the saved position.
Parameters: readlimit - affects nothing See Also: java.io.InputStream.reset |
markSupported | public boolean markSupported()(Code) | | Indicates that this ResourceInputStream supports mark/reset
functionality
true |
read | public int read() throws IOException(Code) | | Reads the next byte of data from the input stream.
the next byte of data, or -1 if the endof the stream is reached. exception: IOException - if an I/O error occurs. |
read | public int read(byte b, int off, int len) throws IOException(Code) | | Reads bytes into a byte array.
Parameters: b - the buffer to read into. Parameters: off - offset to start at in the buffer. Parameters: len - number of bytes to read. the number of bytes read, or -1 if the endof the stream is reached. exception: IOException - if an I/O error occurs. |
|
|