org.apache.poi.hwpf.model
Class TextPiece
java.lang.Object
org.apache.poi.hwpf.model.PropertyNode
org.apache.poi.hwpf.model.TextPiece
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable
public class TextPiece
- extends PropertyNode
- implements java.lang.Comparable
Lightweight representation of a text piece.
- Author:
- Ryan Ackley
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
TextPiece
public TextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd,
int cpStart)
throws java.io.UnsupportedEncodingException
- Parameters:
start
- Offset in main document stream.
- Throws:
java.io.UnsupportedEncodingException
usesUnicode
public boolean usesUnicode()
- Returns:
- If this text piece uses unicode
getPieceDescriptor
public PieceDescriptor getPieceDescriptor()
getStringBuffer
public java.lang.StringBuffer getStringBuffer()
getRawBytes
public byte[] getRawBytes()
substring
public java.lang.String substring(int start,
int end)
adjustForDelete
public void adjustForDelete(int start,
int length)
- Description copied from class:
PropertyNode
- Adjust for a deletion that can span multiple PropertyNodes.
- Overrides:
adjustForDelete
in class PropertyNode
characterLength
public int characterLength()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class PropertyNode
getCP
public int getCP()
Copyright 2008 The Apache Software Foundation or
its licensors, as applicable.