org.apache.poi.hwpf.model
public final class TextPiece extends PropertyNode implements java.lang.Comparable
_buf
Constructor and Description |
---|
TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd,
int cpStart) |
Modifier and Type | Method and Description |
---|---|
void |
adjustForDelete(int start,
int length)
Adjusts the internal string for deletinging
some characters within this.
|
int |
bytesLength()
Returns the length, in bytes
|
int |
characterLength()
Returns the length, in characters
|
boolean |
equals(java.lang.Object o) |
int |
getCP()
Returns the character position we start at.
|
PieceDescriptor |
getPieceDescriptor() |
byte[] |
getRawBytes() |
java.lang.StringBuffer |
getStringBuffer() |
boolean |
isUnicode() |
java.lang.String |
substring(int start,
int end)
Returns part of the string.
|
clone, compareTo, getEnd, getStart, limitsAreEqual, setEnd, setStart
public TextPiece(int start, int end, byte[] text, PieceDescriptor pd, int cpStart)
start
- Beginning offset in main document stream, in characters.end
- Ending offset in main document stream, in characters.text
- The raw bytes of our textpublic boolean isUnicode()
public PieceDescriptor getPieceDescriptor()
public java.lang.StringBuffer getStringBuffer()
public byte[] getRawBytes()
public java.lang.String substring(int start, int end)
start
- Local start position, in charactersend
- Local end position, in characterspublic void adjustForDelete(int start, int length)
adjustForDelete
in class PropertyNode
start
- The start position for the delete, in characterslength
- The number of characters to deletepublic int characterLength()
public int bytesLength()
public boolean equals(java.lang.Object o)
equals
in class PropertyNode
public int getCP()
Copyright 2014 The Apache Software Foundation or its licensors, as applicable.