uk.me.parabola.imgfmt.app.labelenc
Class CodeFunctions

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.labelenc.CodeFunctions

public class CodeFunctions
extends java.lang.Object

Author:
Steve Ratcliffe

Field Summary
static int ENCODING_FORMAT6
           
 
Constructor Summary
CodeFunctions()
           
 
Method Summary
static CodeFunctions createEncoderForLBL(int format)
          Sets encoding functions for a given format and code page.
static CodeFunctions createEncoderForLBL(java.lang.String charset)
          Create a CharacterEncoder for the given charset option.
 int getCodepage()
           
 CharacterDecoder getDecoder()
           
static CharacterDecoder getDefaultDecoder()
           
static CharacterEncoder getDefaultEncoder()
           
 CharacterEncoder getEncoder()
           
 int getEncodingType()
           
protected  void setCodepage(int codepage)
           
protected  void setDecoder(CharacterDecoder decoder)
           
protected  void setEncoder(CharacterEncoder encoder)
           
protected  void setEncodingType(int encodingType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING_FORMAT6

public static final int ENCODING_FORMAT6
See Also:
Constant Field Values
Constructor Detail

CodeFunctions

public CodeFunctions()
Method Detail

setEncoder

protected void setEncoder(CharacterEncoder encoder)

getEncoder

public CharacterEncoder getEncoder()

setDecoder

protected void setDecoder(CharacterDecoder decoder)

getDecoder

public CharacterDecoder getDecoder()

getEncodingType

public int getEncodingType()

setEncodingType

protected void setEncodingType(int encodingType)

getCodepage

public int getCodepage()

setCodepage

protected void setCodepage(int codepage)

createEncoderForLBL

public static CodeFunctions createEncoderForLBL(java.lang.String charset)
Create a CharacterEncoder for the given charset option. Note that this routine also writes to the lblHeader parameter to set the encoding type.

Parameters:
charset - The mkgmap command line option to be interpreted.
Returns:
The various character set parameters that will be needed.

createEncoderForLBL

public static CodeFunctions createEncoderForLBL(int format)
Sets encoding functions for a given format and code page. This is used when reading from an existing file.

Parameters:
format - The format from the lbl header.
Returns:
The various character set parameters that will be needed.

getDefaultEncoder

public static CharacterEncoder getDefaultEncoder()

getDefaultDecoder

public static CharacterDecoder getDefaultDecoder()