org.apache.poi.hwpf.model
public final class TextPieceTable extends java.lang.Object implements CharIndexTranslator
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList |
_textPieces |
Constructor and Description |
---|
TextPieceTable() |
TextPieceTable(byte[] documentStream,
byte[] tableStream,
int offset,
int size,
int fcMin) |
Modifier and Type | Method and Description |
---|---|
int |
adjustForInsert(int listIndex,
int length)
Adjust all the text piece after inserting some text into one of them
|
boolean |
equals(java.lang.Object o) |
int |
getCharIndex(int bytePos)
Calculates the char index of the given byte index.
|
int |
getCpMin() |
java.util.List |
getTextPieces() |
boolean |
isUnicodeAtByteOffset(int bytePos)
Is the text at the given byte offset unicode, or plain old ascii? In a
very evil fashion, you have to actually know this to make sense of
character and paragraph properties :(
|
boolean |
isUnicodeAtCharOffset(int cp)
Is the text at the given Character offset unicode, or plain old ascii? In
a very evil fashion, you have to actually know this to make sense of
character and paragraph properties :(
|
byte[] |
writeTo(HWPFOutputStream docStream) |
public TextPieceTable()
public TextPieceTable(byte[] documentStream, byte[] tableStream, int offset, int size, int fcMin)
public int getCpMin()
public java.util.List getTextPieces()
public boolean isUnicodeAtCharOffset(int cp)
cp
- The character offset to check aboutpublic boolean isUnicodeAtByteOffset(int bytePos)
CharIndexTranslator
isUnicodeAtByteOffset
in interface CharIndexTranslator
bytePos
- The character offset to check aboutpublic byte[] writeTo(HWPFOutputStream docStream) throws java.io.IOException
java.io.IOException
public int adjustForInsert(int listIndex, int length)
listIndex
- The TextPiece that had characters inserted intolength
- The number of characters insertedpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int getCharIndex(int bytePos)
CharIndexTranslator
getCharIndex
in interface CharIndexTranslator
bytePos
- The character offset to checkCopyright 2014 The Apache Software Foundation or its licensors, as applicable.