|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.healthmarketscience.jackcess.scsu.SCSU
com.healthmarketscience.jackcess.scsu.Expand
public class Expand
Reference decoder for the Standard Compression Scheme for Unicode (SCSU)
Field Summary | |
---|---|
protected int |
iIn
input cursor used by the following functions |
protected int |
iOut
string buffer length used by the following functions |
Constructor Summary | |
---|---|
Expand()
|
Method Summary | |
---|---|
int |
bytesRead()
|
static char |
charFromTwoBytes(byte hi,
byte lo)
assemble a char from two bytes In Java bytes are signed quantities, while chars are unsigned |
int |
charsWritten()
|
protected void |
defineExtendedWindow(char chOffset)
(re-)define (and select) a window as an extended dynamic window The surrogate area in Unicode allows access to 2**20 codes beyond the first 64K codes by combining one of 1024 characters from the High Surrogate Area with one of 1024 characters from the Low Surrogate Area (see Unicode 2.0 for the details). |
protected void |
defineWindow(int iWindow,
byte bOffset)
(re-)define (and select) a dynamic window A sliding window position cannot start at any Unicode value, so rather than providing an absolute offset, this function takes an index value which selects among the possible starting values. |
java.lang.String |
expand(byte[] in)
expand a byte array containing compressed Unicode |
protected java.lang.String |
expandSingleByte(byte[] in)
expand portion of the input that is in single byte mode |
protected int |
expandUnicode(byte[] in,
int iCur,
java.lang.StringBuilder sb)
expand input that is in Unicode mode |
void |
reset()
reset is called to start with new input, w/o creating a new instance |
Methods inherited from class com.healthmarketscience.jackcess.scsu.SCSU |
---|
getCurrentWindow, isCompressible, selectWindow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int iOut
protected int iIn
Constructor Detail |
---|
public Expand()
Method Detail |
---|
protected void defineWindow(int iWindow, byte bOffset) throws IllegalInputException
iWindow
- - index of the window to be (re-)definedbOffset
- - index for the new offset value
IllegalInputException
protected void defineExtendedWindow(char chOffset)
chOffset
- - Since the three top bits of chOffset are not needed to set the location of the
extended Window, they are used instead to select the window, thereby reducing the
number of needed command codes. The bottom 13 bits of chOffset are used to
calculate the offset relative to a 7 bit input data byte to yield the 20 bits
expressed by each surrogate pair.protected int expandUnicode(byte[] in, int iCur, java.lang.StringBuilder sb) throws IllegalInputException, EndOfInputException
in
- input byte array to be expandediCur
- starting indexsb
- string buffer to which to append expanded input
IllegalInputException
EndOfInputException
public static char charFromTwoBytes(byte hi, byte lo)
hi
- most significant bytelo
- least significant byte
protected java.lang.String expandSingleByte(byte[] in) throws IllegalInputException, EndOfInputException
IllegalInputException
EndOfInputException
public java.lang.String expand(byte[] in) throws IllegalInputException, EndOfInputException
IllegalInputException
EndOfInputException
public void reset()
reset
in class SCSU
public int charsWritten()
public int bytesRead()
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |