|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--mediaframe.mpeg1.CryptedInputStream
The CryptedInputStream class implements decryption
function of the MPEG stream.
| Field Summary | |
private int |
encryption_index
The current index in the encryption key. |
private byte[] |
encryption_key
The array of bytes (encryption key) which are used for encription of the movie stream. |
| Fields inherited from class java.io.FilterInputStream |
in |
| Fields inherited from class java.io.InputStream |
|
| Constructor Summary | |
CryptedInputStream(java.io.InputStream in)
Constructor of the CryptedInputStream class. |
|
| Method Summary | |
int |
read()
Reads one byte from the input stream and decrypts it using xor 0x55 operation. |
int |
read(byte[] b)
Reads n bytes from the input stream into the buffer b
and decrypts them using xor 0x55 operation |
int |
read(byte[] b,
int off,
int len)
Reads len bytes from the input stream into the buffer b
starting from the offset off
and decrypts them using xor 0x55 operation |
| Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int encryption_index
private byte[] encryption_key
| Constructor Detail |
public CryptedInputStream(java.io.InputStream in)
throws java.lang.Exception
CryptedInputStream class.
in - the MPEG input stream which is decrypted.
java.lang.Exception - raises if an error occurs during initialization.| Method Detail |
public int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occurs.
public int read(byte[] b)
throws java.io.IOException
b
and decrypts them using xor 0x55 operation
read in class java.io.FilterInputStreamb - the buffer into which the data is read.
java.io.IOException - if an I/O error occurs.
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the input stream into the buffer b
starting from the offset off
and decrypts them using xor 0x55 operation
read in class java.io.FilterInputStreamb - the buffer into which the data is read.off - the start offset in the array b.len - the number of the bytes to read.
java.io.IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||