|
kitfox-svg-core 1.0.0-build001 / 2012-04-07T15:40:49.711-0500 |
|||||||||
| 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.kitfox.svg.xml.cpx.CPXInputStream
public class CPXInputStream
This class reads/decodes the CPX file format. This format is a simple compression/encryption transformer for XML data. This stream takes in encrypted XML and outputs decrypted. It does this by checking for a magic number at the start of the stream. If absent, it treats the stream as raw XML data and passes it through unaltered. This is to aid development in debugging versions, where the XML files will not be in CPX format. See http://java.sun.com/developer/technicalArticles/Security/Crypto/
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Fields inherited from interface com.kitfox.svg.xml.cpx.CPXConsts |
|---|
MAGIC_NUMBER, XL_PLAIN, XL_ZIP_CRYPT |
| Constructor Summary | |
|---|---|
CPXInputStream(InputStream in)
Creates a new instance of CPXInputStream |
|
| Method Summary | |
|---|---|
int |
available()
This method returns 1 if we've not reached EOF, 0 if we have. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
protected boolean |
decryptChunk()
Call when inflater indicates that it needs more bytes. |
boolean |
markSupported()
We do not allow marking |
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] b)
Reads up to byte.length bytes of data from this
input stream into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream
into an array of bytes. |
long |
skip(long n)
Skips bytes by reading them into a cached buffer |
| Methods inherited from class java.io.FilterInputStream |
|---|
mark, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CPXInputStream(InputStream in)
throws IOException
IOException| Method Detail |
|---|
public boolean markSupported()
markSupported in class FilterInputStream
public void close()
throws IOException
in.close().
close in interface Closeableclose in class FilterInputStreamIOException - if an I/O error occurs.FilterInputStream.in
public int read()
throws IOException
int in the range
0 to 255. If no byte is available
because the end of the stream has been reached, the value
-1 is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
This method
simply performs in.read() and returns the result.
read in class FilterInputStream-1 if the end of the
stream is reached.
IOException - if an I/O error occurs.FilterInputStream.in
public int read(byte[] b)
throws IOException
byte.length bytes of data from this
input stream into an array of bytes. This method blocks until some
input is available.
This method simply performs the call
read(b, 0, b.length) and returns
the result. It is important that it does
not do in.read(b) instead;
certain subclasses of FilterInputStream
depend on the implementation strategy actually
used.
read in class FilterInputStreamb - the buffer into which the data is read.
-1 if there is no more data because the end of
the stream has been reached.
IOException - if an I/O error occurs.FilterInputStream.read(byte[], int, int)
public int read(byte[] b,
int off,
int len)
throws IOException
len bytes of data from this input stream
into an array of bytes. This method blocks until some input is
available.
This method simply performs in.read(b, off, len)
and returns the result.
read in class FilterInputStreamb - the buffer into which the data is read.off - the start offset of the data.len - the maximum number of bytes read.
-1 if there is no more data because the end of
the stream has been reached.
IOException - if an I/O error occurs.FilterInputStream.in
protected boolean decryptChunk()
throws IOException
IOExceptionpublic int available()
available in class FilterInputStream
public long skip(long n)
throws IOException
skip in class FilterInputStreamIOException
|
kitfox-svg-core 1.0.0-build001 / 2012-04-07T15:40:49.711-0500 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||