01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/TKAnsiConverter.java,v 1.6 2002/01/21 09:54:56 mischa Exp $
03: *
04: */
05: package com.teamkonzept.lib;
06:
07: /**
08: * Konvertierungsklasse fuer ANSI-Codierung
09: * @author $Author: mischa $
10: * @version $Revision: 1.6 $
11: */
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: return CONV_NAME;
19: }
20:
21: public int getMaxBytesPerChar() {
22: return 1;
23: }
24:
25: public int minCharSize(int byteCount) {
26: return byteCount;
27: }
28:
29: public int charsToBytes(char src[], byte dst[], int srcBegin,
30: int length, int dstBegin) {
31: (new String(src, srcBegin, length)).getBytes(0, length, dst,
32: dstBegin);
33: return length;
34: }
35:
36: public int bytesToChars(byte src[], char dst[], int srcBegin,
37: int length, int dstBegin) {
38: (new String(src, 0, srcBegin, length)).getChars(0, length, dst,
39: dstBegin);
40: return length;
41: }
42:
43: }
|