org.mobicents.protocols.smpp.encoding
Class HPRoman8Encoding
java.lang.Object
org.mobicents.protocols.smpp.encoding.AbstractMessageEncoding<String>
org.mobicents.protocols.smpp.encoding.AlphabetEncoding
org.mobicents.protocols.smpp.encoding.HPRoman8Encoding
- All Implemented Interfaces:
- MessageEncoding<String>
public final class HPRoman8Encoding
- extends AlphabetEncoding
Encoding class representing the HP-Roman8 character set.
- Version:
- $Id: HPRoman8Encoding.java 452 2009-01-15 16:56:36Z orank $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HPRoman8Encoding
public HPRoman8Encoding()
getUnknownCharReplacement
public int getUnknownCharReplacement()
setUnknownCharReplacement
public void setUnknownCharReplacement(int unknownCharReplacement)
- Set the byte to use when there is no code point for a Unicode character.
This byte will be inserted into an encoded byte array if the String
being encoded contains a character that HPRoman8
has no code point for. The default is to insert the code point for
the '?' character - that is, byte 0x3f.
- Parameters:
unknownCharReplacement - A code point for one of the characters
in the Roman8 character table.
- Throws:
IllegalArgumentException - If 0 < unknownCharReplacement
< 256 or unknownCharReplacement is 0x1b
.
decode
public String decode(byte[] data,
int offset,
int length)
- Description copied from class:
AlphabetEncoding
- Convert SMS message text into a Java String.
- Overrides:
decode in class AlphabetEncoding
- Parameters:
data - The bytes to decode.offset - The offset within the data to begin decoding characters.length - The number of bytes to decode to characters.
encode
public byte[] encode(String s)
- Description copied from class:
AlphabetEncoding
- Convert a Java String into SMS message text. Implementations of this
method must support encoding a
null string. In
such cases, a byte array of length 0 will be returned.
- Specified by:
encode in interface MessageEncoding<String>- Overrides:
encode in class AlphabetEncoding
Copyright © 2011 Mobicents. All Rights Reserved.