|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.io.CharEncoder com.novell.io.ASCIIEncoder
Implementation of "US-ASCII" encoding.
Field Summary | |
static String |
NAME
Name of encoding that this encoder implements. |
static String |
NAME_SECONDARY
Other name of encoding that this encoder implements. |
Constructor Summary | |
ASCIIEncoder()
|
Method Summary | |
int |
encodeChar(int c,
byte[] buffer,
int off)
Implementation of ASCII character encoding |
int |
encodeChars(char[] chars,
int off,
int len,
byte[] buffer,
int outputIndex)
Encode some number of characters into bytes in a buffer. |
String |
getEncoding()
Return the string identifier for this encoding scheme. |
Methods inherited from class com.novell.io.CharEncoder |
doGetClass, getEncoder, registerEncoder, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String NAME
public static final String NAME_SECONDARY
Constructor Detail |
public ASCIIEncoder()
Method Detail |
public int encodeChars(char[] chars, int off, int len, byte[] buffer, int outputIndex) throws CharEncodingException, EncodingBufferFullException
encodeChars
in class CharEncoder
chars
- The array of characters to convertoff
- The offset into the array of the first character to convertlen
- The number of characters to convertbuffer
- The byte array in which to store the encoded bytesoutputIndex
- The offset into buffer at which to store the encoded bytes
CharEncodingException
- If a character could not be encoded
CharEncoderBufferFull
- If the passed buffer is too small
EncodingBufferFullException
public int encodeChar(int c, byte[] buffer, int off) throws CharEncodingException, EncodingBufferFullException
encodeChar
in class CharEncoder
c
- The 32-bit character value to encodebuffer
- The byte buffer in which to placed encoded bytesoff
- The offset at which to place bytes into the buffer
CharEncodingException
- The character could not be encoded
in the implemented encoding scheme.
EncodingBufferFullException
- There is not enough room in buffer
for all the bytes needed to encode the character.public String getEncoding()
getEncoding
in class CharEncoder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |