Add a couple of methods to help make debugging problems in hwpf easier

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1024302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2010-10-19 16:05:16 +00:00
parent 7b4dc141ae
commit 40c968c111
2 changed files with 12 additions and 1 deletions

View File

@ -608,5 +608,8 @@ public final class CharacterRun
return _props.getBrc(); return _props.getBrc();
} }
public String toString() {
String text = text();
return "CharacterRun of " + text.length() + " characters - " + text;
}
} }

View File

@ -154,6 +154,14 @@ public final class Picture
out.write(_dataStream, pictureBytesStartOffset, size); out.write(_dataStream, pictureBytesStartOffset, size);
} }
} }
/**
* @return The offset of this picture in the picture bytes, used
* when matching up with {@link CharacterRun#getPicOffset()}
*/
public int getStartOffset() {
return dataBlockStartOfsset;
}
/** /**
* @return picture's content as byte array * @return picture's content as byte array