| java.lang.Object com.internetcds.jdbc.tds.EncodingHelper
EncodingHelper | public class EncodingHelper (Code) | | Helper class to handle server character set conversion.
author: Stefan Bodewig stefan.bodewig@megabit.net version: $Id: EncodingHelper.java,v 1.2 2007-10-19 13:21:40 sinisa Exp $ |
Method Summary | |
public boolean | canBeConverted(String value) Can the given String be converted to the server's charset?
Does not work for DBCS charsets. | public byte[] | getBytes(String value) Translate the String into a byte[] in the server's encoding. | public static EncodingHelper | getHelper(String encodingName) Return the helper object for the given encoding. | public String | getString(byte[] value) Translate the byte[] from the server's encoding to a Unicode String. | public String | getString(byte[] value, int off, int len) Translate part of the byte[] from the server's encoding to a
Unicode String. | public boolean | isDBCS() |
canBeConverted | public boolean canBeConverted(String value)(Code) | | Can the given String be converted to the server's charset?
Does not work for DBCS charsets.
|
getBytes | public byte[] getBytes(String value)(Code) | | Translate the String into a byte[] in the server's encoding.
|
getString | public String getString(byte[] value)(Code) | | Translate the byte[] from the server's encoding to a Unicode String.
|
getString | public String getString(byte[] value, int off, int len)(Code) | | Translate part of the byte[] from the server's encoding to a
Unicode String.
The subarray starting at index off and extending to off+len-1
is translated.
|
isDBCS | public boolean isDBCS()(Code) | | Is this a DBCS charset (does it need more than one byte per character)?
|
|
|