|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream | +--cryptix.util.mime.Base64InputStream
This class implements a BASE64 Character stream encoder as specified in RFC1521, part of the MIME specification as published by the Internet Engineering Task Force (IETF).
Unlike other encoding schemes there is nothing in this encoding that indicates where a buffer starts or ends. In other words, the encoded text simply starts at the first line and ends with the last one.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
cryptix.mime.Base64OutputStream
,
cryptix.mime.Base64
Field Summary | |
(package private) static int |
CONV_OTHER
|
(package private) static int |
CONV_PAD
|
(package private) static int |
CONV_WHITE
|
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
Base64InputStream(java.io.InputStream is)
Create a Base64InputStream with no checksum. |
|
Base64InputStream(java.io.InputStream is,
boolean check)
If check is true then look for and check a PGP-style checksum immediately after the base64 portion. |
|
Base64InputStream(java.io.InputStream is,
java.util.zip.Checksum checksum,
int length)
Creates a Base64InputStream that uses the given checksum. |
Method Summary | |
int |
available()
Returns the number of bytes that can be guaranteed to be read from this input stream without blocking. |
void |
close()
|
void |
mark(int readlimit)
Does nothing, since this class does not support mark/reset. |
boolean |
markSupported()
Tests if this input stream supports the mark and
reset methods of InputStream, which it does not. |
int |
read()
Parse input in fours, producing three bytes to outBuf. |
int |
read(byte[] buffer,
int offset,
int length)
|
void |
reset()
Always throws an IOException, since this class does not support mark/reset. |
long |
skip(long n)
Skips over and discards n bytes of data from the input stream. |
Methods inherited from class java.io.FilterInputStream |
read |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final int CONV_WHITE
static final int CONV_PAD
static final int CONV_OTHER
Constructor Detail |
public Base64InputStream(java.io.InputStream is, boolean check)
PRZ24
public Base64InputStream(java.io.InputStream is)
public Base64InputStream(java.io.InputStream is, java.util.zip.Checksum checksum, int length)
Method Detail |
public void close() throws java.io.IOException
close
in class java.io.FilterInputStream
public int read() throws java.io.IOException
When using a checksum, wait for a "=" as the first character of
a quadruplet; read sufficient quadruplets for crcLength
bytes, and compare with our crc. If the end of the stream is reached
at a bad spot, throw EOFException.
If we get the first illegal character on a four byte boundary, return -1 (Java EOF convention). Iff the underlying input stream is an instanceof PushbackInputStream, the illegal character will be pushed back.
read
in class java.io.FilterInputStream
PushbackInputStream
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.FilterInputStream
public long skip(long n) throws java.io.IOException
skip
method may, for a variety of
reasons, end up skipping over some smaller number of bytes,
possibly 0. The actual number of bytes skipped is returned.skip
in class java.io.FilterInputStream
n
- the number of bytes to be skipped.java.io.IOException
- if an I/O error occurs.public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
- if an I/O error occurs.public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
public boolean markSupported()
mark
and
reset
methods of InputStream, which it does not.markSupported
in class java.io.FilterInputStream
false
, since this class does not support the
mark
and reset
methods.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |