org.archive.util.ms
Class Cp1252

java.lang.Object
  extended by org.archive.util.ms.Cp1252

public class Cp1252
extends java.lang.Object

A fast implementation of code page 1252. This is used to convert bytes to characters in .doc files that don't use unicode.

The Java Charset APIs seemed like overkill for these translations, since 1 byte always translates into 1 character.

Author:
pjack

Method Summary
static char decode(int b)
          Returns the Unicode character for the given Cp1252 byte.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static char decode(int b)
Returns the Unicode character for the given Cp1252 byte.

Parameters:
b - an unsigned byte from 0 to 255
Returns:
the Unicode character corresponding to that byte


Copyright © 2003-2011 Internet Archive. All Rights Reserved.