Framework Professional Edition Package


com.prosyst.util.io
Class CharacterConvertor_UTF8

java.lang.Object
  extended by com.prosyst.util.io.CharacterConvertor
      extended by com.prosyst.util.io.CharacterConvertor_UTF8

public class CharacterConvertor_UTF8
extends CharacterConvertor


Constructor Summary
CharacterConvertor_UTF8()
           
 
Method Summary
 void convert(byte[] input, int off1, int len1, char[] output, int off2, int len2, int[] result)
          Converts the input bytes, using the specified encoding into unicode chars.
 void convert(char[] input, int off1, int len1, byte[] output, int off2, int len2, int[] result)
          Converts the input chars, using the specified encoding into bytes in the given range.
 java.lang.String getCharacterEncoding()
          Gets the identifier String of the encoding.
 int getMaxBytesPerChar()
          Gets the maximum bytes that may be used for the conversion of a single char, using this CharacterConvertor's encoding.
 
Methods inherited from class com.prosyst.util.io.CharacterConvertor
get, getDefaultEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterConvertor_UTF8

public CharacterConvertor_UTF8()
Method Detail

convert

public void convert(char[] input,
                    int off1,
                    int len1,
                    byte[] output,
                    int off2,
                    int len2,
                    int[] result)
             throws java.io.IOException
Description copied from class: CharacterConvertor
Converts the input chars, using the specified encoding into bytes in the given range. Conversion ends if there's no more input or if the output gets full.

Specified by:
convert in class CharacterConvertor
Parameters:
input - characters to be converted
off1 - offset position in the input arrat of the first character to be converted
len1 - count of characters to be converted
output - where output bytes are put
off2 - offset of the first output byte
len2 - count of bytes that may be used for output conversion
result - a non-null two element int[], which holds the result lengths from the conversion: result[0] contains the number of chars converted and result[1] - the number of bytes that are result of the conversion
Throws:
java.io.IOException - if there's some error during conversion

convert

public void convert(byte[] input,
                    int off1,
                    int len1,
                    char[] output,
                    int off2,
                    int len2,
                    int[] result)
             throws java.io.IOException
Description copied from class: CharacterConvertor
Converts the input bytes, using the specified encoding into unicode chars. Conversion ends if there's no more input or if the output gets full.

Specified by:
convert in class CharacterConvertor
Parameters:
input - bytes to be converted
off1 - offset position in the input arrat of the first byte to be converted
len1 - count of bytes to be converted
output - where output chars are put
off2 - offset of the first output char
len2 - count of chars that may be used for output conversion
result - a non-null two element int[], which holds the result lengths from the conversion: result[0] contains the number of bytes converted and result[1] - the number of chars that are result of the conversion
Throws:
java.io.IOException - if there's some error during conversion

getMaxBytesPerChar

public int getMaxBytesPerChar()
Description copied from class: CharacterConvertor
Gets the maximum bytes that may be used for the conversion of a single char, using this CharacterConvertor's encoding.

Specified by:
getMaxBytesPerChar in class CharacterConvertor
Returns:
maximum number of bytes, necessary to convert a char.

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Description copied from class: CharacterConvertor
Gets the identifier String of the encoding. This may be not the same string, which has been used for obtaining the CharacterConverter.

Specified by:
getCharacterEncoding in class CharacterConvertor
Returns:
key string for the encoding

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved