public class BundleResourceStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
protected long |
contentLen |
protected java.io.InputStream |
wis |
| Constructor and Description |
|---|
BundleResourceStream(java.io.InputStream is,
long length)
BundleResourceStream
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Return the number of bytes available for immediate read
|
void |
close()
Close input stream
|
long |
getContentLength()
Get length of resource stream.
|
void |
mark(int readlimit)
Mark current position in input stream
|
boolean |
markSupported()
Check it mark/reset is supported.
|
int |
read()
Read a byte from the input stream.
|
int |
read(byte[] dest)
Read bytes from the input stream.
|
int |
read(byte[] dest,
int off,
int len)
Read a specified number of bytes from the input stream.
|
void |
reset()
Return to marked position.
|
long |
skip(long len)
Skip over (and discard) a specified number of bytes in this input
stream.
|
public BundleResourceStream(java.io.InputStream is,
long length)
is - Underlying input stream.public long getContentLength()
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] dest)
throws java.io.IOException
read in class java.io.InputStreamdest - Byte array to read intojava.io.IOExceptionpublic int read(byte[] dest,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamdest - Byte array to read intooff - Starting offset into the byte arraylen - Maximum number of bytes to readjava.io.IOExceptionpublic long skip(long len)
throws java.io.IOException
skip in class java.io.InputStreamlen - Number of bytes to be skippedjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreamreadlimit - Maximum of bytes when can save.public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStream