1 5 package com.teamkonzept.lib; 6 7 12 public class TKAnsiConverter extends TKConverter { 13 14 public final static String CONV_ID = "ANSI"; 15 public final static String CONV_NAME = "ISO-8859_1"; 16 17 public String getName() 18 { 19 return CONV_NAME; 20 } 21 22 public int getMaxBytesPerChar() 23 { 24 return 1; 25 } 26 27 public int minCharSize(int byteCount) 28 { 29 return byteCount; 30 } 31 32 public int charsToBytes(char src[], byte dst[], int srcBegin, int length, int dstBegin) 33 { 34 (new String (src, srcBegin, length)).getBytes(0,length,dst,dstBegin); 35 return length; 36 } 37 38 public int bytesToChars(byte src[], char dst[], int srcBegin, int length, int dstBegin) 39 { 40 (new String (src, 0, srcBegin, length)).getChars(0,length,dst,dstBegin); 41 return length; 42 } 43 44 } 45 46 | Popular Tags |