add Section.toString() for debug purposes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-05 11:58:24 +00:00
parent e1e99605de
commit 34436d6ec7

View File

@ -49,5 +49,21 @@ public final class Section
return s;
}
@Override
public String toString()
{
return toString( true );
}
public String toString( boolean withProperties )
{
return "Section ("
+ getStartOffset()
+ "--"
+ getEndOffset()
+ ")"
+ (withProperties ? "\n"
+ _props.toString().replaceAll( "\n", "\n\t" ) : "");
}
}