mirror of https://github.com/apache/poi.git
add toString() to SprmBuffer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1145407 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb72a45d85
commit
b751feb535
|
@ -220,4 +220,26 @@ public final class SprmBuffer implements Cloneable
|
|||
}
|
||||
addSprm(opcode, operand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append( "Sprms (" );
|
||||
stringBuilder.append( _buf.length );
|
||||
stringBuilder.append( " byte(s)): " );
|
||||
for ( SprmIterator iterator = iterator(); iterator.hasNext(); )
|
||||
{
|
||||
try
|
||||
{
|
||||
stringBuilder.append( iterator.next() );
|
||||
}
|
||||
catch ( Exception exc )
|
||||
{
|
||||
stringBuilder.append( "error" );
|
||||
}
|
||||
stringBuilder.append( "; " );
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue