Package org.apache.poi.hwpf.model
Class OldTextPiece
java.lang.Object
org.apache.poi.hwpf.model.PropertyNode<TextPiece>
org.apache.poi.hwpf.model.TextPiece
org.apache.poi.hwpf.model.OldTextPiece
- All Implemented Interfaces:
Cloneable
,Comparable<TextPiece>
Lightweight representation of a text piece.
Works in the character domain, not the byte domain, so you
need to have turned byte references into character
references before getting here.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.hwpf.model.PropertyNode
PropertyNode.EndComparator, PropertyNode.StartComparator
-
Field Summary
Fields inherited from class org.apache.poi.hwpf.model.PropertyNode
_buf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustForDelete
(int start, int length) Deprecated.int
Returns the length, in bytesboolean
byte[]
int
hashCode()
boolean
substring
(int start, int end) Deprecated.toString()
Methods inherited from class org.apache.poi.hwpf.model.TextPiece
characterLength, getCP, getPieceDescriptor, getStringBuffer
Methods inherited from class org.apache.poi.hwpf.model.PropertyNode
clone, compareTo, getEnd, getStart, limitsAreEqual, setEnd, setStart
-
Constructor Details
-
OldTextPiece
- Parameters:
start
- Beginning offset in main document stream, in characters.end
- Ending offset in main document stream, in characters.text
- The raw bytes of our text
-
-
Method Details
-
isUnicode
- Overrides:
isUnicode
in classTextPiece
- Returns:
- nothing, ever. Always throws an UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
getStringBuilder
- Overrides:
getStringBuilder
in classTextPiece
-
getRawBytes
public byte[] getRawBytes()- Overrides:
getRawBytes
in classTextPiece
-
substring
Deprecated.Returns part of the string. Works only in characters, not in bytes!- Overrides:
substring
in classTextPiece
- Parameters:
start
- Local start position, in charactersend
- Local end position, in characters- Throws:
UnsupportedOperationException
-
adjustForDelete
Deprecated.Not implemented for OldTextPiece. Always throws UnsupportedOperationException- Overrides:
adjustForDelete
in classTextPiece
- Parameters:
start
- The start position for the delete, in characterslength
- The number of characters to delete
-
bytesLength
public int bytesLength()Returns the length, in bytes- Overrides:
bytesLength
in classTextPiece
-
hashCode
public int hashCode() -
equals
-
toString
-