|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.kirkwarez.kirkpack.io.eoa.wdysv.WDYSVInputStream
This stream streams in MYST V encrypted data and streams out the decrypted data. Since the WDYSV header has the length tag set, one can retrieve the eventual length of the data at any time.
Field Summary | |
private static byte[] |
KEY
The key. |
protected int |
length
The length read from the header. |
protected int |
total
The total read from the stream. |
static int |
WDYSV_HEADER
The WDYSV header. |
Fields inherited from class java.io.FilterInputStream |
in |
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
WDYSVInputStream(InputStream input)
Creates a stream over the given stream. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read without blockage. |
int |
getLength()
Returns the length of the unencrypted data as indicated by the header of the file. |
int |
read()
Reads an unsigned byte and returns it as an int. |
int |
read(byte[] buffer,
int offset,
int length)
Fills the array with bytes from the stream. |
protected void |
setLength(int length)
Sets the length of the unencrypted data from the indication by the header of the file. |
long |
skip(long amount)
Skips the given amount of bytes, or at least tries to. |
Methods inherited from class java.io.FilterInputStream |
close, mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int length
protected int total
private static byte[] KEY
public static final int WDYSV_HEADER
Constructor Detail |
public WDYSVInputStream(InputStream input) throws IOException
input
- The stream to read from.
IOException
- When the given stream does not produce EAO data.Method Detail |
public int read() throws IOException
IOException
- When boo boo goes doo doo.InputStream.read()
public int read(byte[] buffer, int offset, int length) throws IOException
buffer
- The buffer to read the data into.offset
- The starting offset.length
- The amount of bytes to read.
IOException
- When boo boo goes doo doo.InputStream.read(byte[], int, int)
public long skip(long amount) throws IOException
IOException
InputStream.read(byte[], int, int)
,
InputStream.skip(long)
public int available() throws IOException
IOException
InputStream.available()
public int getLength()
protected void setLength(int length)
length
- The length of the unencrypted data.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |