|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectcom.bytecream.codec.Base64EncoderNIO
Provides a set of static methods to encode a ByteBuffer or a ByteChannel
with the Base64 algorithm.
The methods encodeXXXWithLineSeparator(...) uses the
system line separator provided by
System.getProperty("line.separator").
This line separator must be CRLF or a string of length 1.
For the best performance, use this library in server mode and disable
assertions.
java -server ...
| Method Summary | |
static java.nio.ByteBuffer |
encodeToByteBufferWithCRLF(java.nio.ByteBuffer _data,
boolean _end,
boolean _direct)
Encodes the remaining bytes of a ByteBuffer, inserting a CRLF every 76 characters. |
static java.nio.ByteBuffer |
encodeToByteBufferWithCRLF(java.nio.ByteBuffer _data,
int _length,
boolean _end,
boolean _direct)
Encodes a given number of bytes of a ByteBuffer, inserting a CRLF every 76 characters. |
static java.nio.ByteBuffer |
encodeToByteBufferWithLineSeparator(java.nio.ByteBuffer _data,
boolean _end,
boolean _direct)
Encodes the remaining bytes of a ByteBuffer, inserting a line separator every 76 characters. |
static java.nio.ByteBuffer |
encodeToByteBufferWithLineSeparator(java.nio.ByteBuffer _data,
int _length,
boolean _end,
boolean _direct)
Encodes a given number of bytes of a ByteBuffer, inserting a line separator every 76 characters. |
static java.nio.ByteBuffer |
encodeToByteBufferWithoutSeparator(java.nio.ByteBuffer _data,
boolean _direct)
Encodes the remaining bytes of a ByteBuffer. |
static java.nio.ByteBuffer |
encodeToByteBufferWithoutSeparator(java.nio.ByteBuffer _data,
int _length,
boolean _direct)
Encodes a given number of bytes of a ByteBuffer. |
static void |
encodeWithCRLF(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output,
boolean _end)
Encodes the remaining bytes of a ByteBuffer, inserting a CRLF every 76 characters. |
static void |
encodeWithCRLF(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output,
boolean _end)
Encodes a given number of bytes of a ByteBuffer, inserting a CRLF every 76 characters. |
static void |
encodeWithCRLF(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
Encodes the data read from a byte channel and write it on a byte channel, inserting a CRLF every 76 characters. |
static void |
encodeWithLineSeparator(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output,
boolean _end)
Encodes the remaining bytes of a ByteBuffer, inserting a line separator every 76 characters. |
static void |
encodeWithLineSeparator(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output,
boolean _end)
Encodes a given number of bytes of a ByteBuffer, inserting a line separator every 76 characters. |
static void |
encodeWithLineSeparator(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
Encodes the data read from a byte channel and write it on a byte channel, inserting a line separator every 76 characters. |
static void |
encodeWithoutSeparator(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output)
Encodes the remaining bytes of a ByteBuffer. |
static void |
encodeWithoutSeparator(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output)
Encodes a given number of bytes of a ByteBuffer. |
static void |
encodeWithoutSeparator(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
Encodes the data read from a byte channel and write it on a byte channel. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final java.nio.ByteBuffer encodeToByteBufferWithCRLF(java.nio.ByteBuffer _data,
boolean _end,
boolean _direct)
_data - the buffer of bytes to read._end - if true add a CRLF at the end._direct - if true return a direct buffer.
public static final java.nio.ByteBuffer encodeToByteBufferWithCRLF(java.nio.ByteBuffer _data,
int _length,
boolean _end,
boolean _direct)
_data - the buffer of bytes to read._length - the number of bytes to read._end - if true add a CRLF at the end._direct - if true return a direct buffer.
public static final java.nio.ByteBuffer encodeToByteBufferWithLineSeparator(java.nio.ByteBuffer _data,
boolean _end,
boolean _direct)
_data - the buffer of bytes to read._end - if true add a line separator at the end._direct - if true return a direct buffer.
public static final java.nio.ByteBuffer encodeToByteBufferWithLineSeparator(java.nio.ByteBuffer _data,
int _length,
boolean _end,
boolean _direct)
_data - the buffer of bytes to read._length - the number of bytes to read._end - if true add a line separator at the end._direct - if true return a direct buffer.
public static final java.nio.ByteBuffer encodeToByteBufferWithoutSeparator(java.nio.ByteBuffer _data,
boolean _direct)
_data - the buffer of bytes to read._direct - if true return a direct buffer.
public static final java.nio.ByteBuffer encodeToByteBufferWithoutSeparator(java.nio.ByteBuffer _data,
int _length,
boolean _direct)
_data - the buffer of bytes to read._length - the number of bytes to read._direct - if true return a direct buffer.
public static final void encodeWithCRLF(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output,
boolean _end)
_data - the buffer of bytes to read._output - the buffer of bytes to write._end - if true add a CRLF at the end.
public static final void encodeWithCRLF(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output,
boolean _end)
_data - the buffer of bytes to read._length - the number of bytes to read._output - the buffer of bytes to write._end - if true add a CRLF at the end.
public static final void encodeWithLineSeparator(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output,
boolean _end)
_data - the buffer of bytes to read._output - the buffer of bytes to write._end - if true add a CRLF at the end.
public static final void encodeWithLineSeparator(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output,
boolean _end)
_data - the buffer of bytes to read._length - the number of bytes to read._output - the buffer of bytes to write._end - if true add a line separator at the end.
public static final void encodeWithoutSeparator(java.nio.ByteBuffer _data,
java.nio.ByteBuffer _output)
_data - the buffer of bytes to read._output - the buffer of bytes to write.
public static final void encodeWithoutSeparator(java.nio.ByteBuffer _data,
int _length,
java.nio.ByteBuffer _output)
_data - the buffer of bytes to read._length - the number of bytes to read._output - the buffer of bytes to write.
public static final void encodeWithCRLF(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
throws java.io.IOException
_input - the byte channel to read._output - the byte channel to write on.
java.io.IOException - if an I/O error occurs.
public static final void encodeWithLineSeparator(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
throws java.io.IOException
_input - the byte channel to read._output - the byte channel to write on.
java.io.IOException - if an I/O error occurs.
public static final void encodeWithoutSeparator(java.nio.channels.ReadableByteChannel _input,
java.nio.channels.WritableByteChannel _output)
throws java.io.IOException
_input - the byte channel to read._output - the byte channel to write on.
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 | |||||