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:
 java.lang.Cloneable,java.lang.Comparable<TextPiece>
@Internal public class OldTextPiece extends 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 
 - 
 
- 
Constructor Summary
Constructors Constructor Description OldTextPiece(int start, int end, byte[] text, PieceDescriptor pd) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadjustForDelete(int start, int length)Deprecated.intbytesLength()Returns the length, in bytesbooleanequals(java.lang.Object other)byte[]getRawBytes()java.lang.StringBuildergetStringBuilder()inthashCode()booleanisUnicode()java.lang.Stringsubstring(int start, int end)Deprecated.java.lang.StringtoString()- 
Methods inherited from class org.apache.poi.hwpf.model.TextPiece
characterLength, getCP, getPieceDescriptor, getStringBuffer 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
OldTextPiece
public OldTextPiece(int start, int end, byte[] text, PieceDescriptor pd)- 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 Detail
- 
isUnicode
@NotImplemented public boolean isUnicode()
 
- 
getStringBuilder
public java.lang.StringBuilder getStringBuilder()
- Overrides:
 getStringBuilderin classTextPiece
 
- 
getRawBytes
public byte[] getRawBytes()
- Overrides:
 getRawBytesin classTextPiece
 
- 
substring
@Deprecated @NotImplemented public java.lang.String substring(int start, int end)
Deprecated.Returns part of the string. Works only in characters, not in bytes! 
- 
adjustForDelete
@Deprecated @NotImplemented public void adjustForDelete(int start, int length)
Deprecated.Not implemented for OldTextPiece. Always throws UnsupportedOperationException- Overrides:
 adjustForDeletein 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:
 bytesLengthin classTextPiece
 
 - 
 
 -