deprecate BytePropertyNode

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1145274 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-11 18:33:32 +00:00
parent 26c1fa750d
commit a61064e853

View File

@ -33,6 +33,7 @@ public abstract class BytePropertyNode<T extends BytePropertyNode<T>> extends
/**
* @param fcStart The start of the text for this property, in _bytes_
* @param fcEnd The end of the text for this property, in _bytes_
* @deprecated
*/
public BytePropertyNode(int fcStart, int fcEnd, CharIndexTranslator translator, Object buf) {
super(
@ -49,6 +50,18 @@ public abstract class BytePropertyNode<T extends BytePropertyNode<T>> extends
this.endBytes = fcEnd;
}
public BytePropertyNode( int charStart, int charEnd, Object buf )
{
super( charStart, charEnd, buf );
if ( charStart > charEnd )
throw new IllegalArgumentException( "charStart (" + charStart
+ ") > charEnd (" + charEnd + ")" );
this.startBytes = -1;
this.endBytes = -1;
}
/**
* @deprecated Though bytes are actually stored in file, it is advised to
* use char positions for all operations. Including save