com.legstar.coxb.host
Class HostContext

java.lang.Object
  extended by com.legstar.coxb.host.HostContext
Direct Known Subclasses:
CobolContext

public class HostContext
extends Object

A class representing a host context, typically the host code page in use for instance. This class is meant to be a generalization for lamguage specific contexts

Author:
Fady Moussallam

Constructor Summary
HostContext()
           
 
Method Summary
static String getDefaultHostCharsetName()
          Provides a default host character set.
 String getHostCharsetName()
           
 byte[] getHostIntegerSigns()
          Returns the numeric characters that might appear in a string representation of an integer converted to the target host charset.
static byte[] getHostIntegerSigns(String charsetName)
           
static String getIntegerSigns()
           
 void setHostCharsetName(String charsetName)
          This will generate an UnsupportedCharsetException if user tries to specify a charset that is not supported by the current JVM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostContext

public HostContext()
Method Detail

getHostCharsetName

public String getHostCharsetName()
Returns:
Returns the current charsetName.

setHostCharsetName

public void setHostCharsetName(String charsetName)
This will generate an UnsupportedCharsetException if user tries to specify a charset that is not supported by the current JVM.

Parameters:
charsetName - The charsetName to set.

getDefaultHostCharsetName

public static String getDefaultHostCharsetName()
Provides a default host character set.

Returns:
the default character set

getHostIntegerSigns

public byte[] getHostIntegerSigns()
Returns the numeric characters that might appear in a string representation of an integer converted to the target host charset.

Returns:
the numeric characters that might appear in a string representation of an integer converted to the target host charset

getHostIntegerSigns

public static byte[] getHostIntegerSigns(String charsetName)
Parameters:
charsetName - the host character set
Returns:
the numeric characters that might appear in a string representation of an integer converted to the target host charset

getIntegerSigns

public static String getIntegerSigns()
Returns:
the characters that might appear in an integer


Copyright © 2015 LegSem. All Rights Reserved.