import org.apache.poi.hssf.record.OldStringRecord;
import org.apache.poi.hssf.record.RKRecord;
import org.apache.poi.hssf.record.RecordInputStream;
-import org.apache.poi.poifs.filesystem.*;
+import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.poifs.filesystem.DocumentNode;
+import org.apache.poi.poifs.filesystem.FileMagic;
+import org.apache.poi.poifs.filesystem.NotOLE2FileException;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.util.IOUtils;
* @return the text contents of the file
*/
public String getText() {
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
// To track formats and encodings
CodepageRecord codepage = null;
}
}
- protected void handleNumericCell(StringBuffer text, double value) {
+ protected void handleNumericCell(StringBuilder text, double value) {
// TODO Need to fetch / use format strings
text.append(value);
text.append('\n');
}
public String toString() {
- StringBuffer retval = new StringBuffer();
+ StringBuilder retval = new StringBuilder();
String label;
String mainLabel;
}
@Override
- public String getHexString()
- {
- StringBuffer sb = new StringBuffer();
- sb.append(getGnumericPart(_red));
- sb.append(':');
- sb.append(getGnumericPart(_green));
- sb.append(':');
- sb.append(getGnumericPart(_blue));
- return sb.toString();
+ public String getHexString() {
+ return getGnumericPart(_red) + ":" + getGnumericPart(_green) + ":" + getGnumericPart(_blue);
}
private String getGnumericPart(byte color)
private static String indent(final int indentLevel,
final String indentString, final String data)
{
- StringBuffer finalBuffer = new StringBuffer();
- StringBuffer indentPrefix = new StringBuffer();
+ StringBuilder finalBuffer = new StringBuilder();
+ StringBuilder indentPrefix = new StringBuilder();
for (int j = 0; j < indentLevel; j++)
{
private static void viewFile(String filename, boolean printName) {
if (printName) {
- StringBuffer flowerbox = new StringBuffer();
+ StringBuilder flowerbox = new StringBuilder();
flowerbox.append(".");
for (int j = 0; j < filename.length(); j++) {
public String toString()
{
- StringBuffer buffer = new StringBuffer(40 * (path.length() + 1));
+ StringBuilder buffer = new StringBuilder(40 * (path.length() + 1));
for (int j = 0; j < path.length(); j++)
{
public String toString()
{
- final StringBuffer b = new StringBuffer();
+ final StringBuilder b = new StringBuilder();
final int l = length();
b.append(File.separatorChar);
public NameIdentifier getSheetIdentifier() {
return _sheetIdentifier;
}
- protected void asFormulaString(StringBuffer sb) {
+ protected void asFormulaString(StringBuilder sb) {
if (_bookName != null) {
sb.append(" [").append(_sheetIdentifier.getName()).append("]");
}
}
}
public String asFormulaString() {
- StringBuffer sb = new StringBuffer(32);
+ StringBuilder sb = new StringBuilder(32);
asFormulaString(sb);
return sb.toString();
}
public String toString() {
- StringBuffer sb = new StringBuffer(64);
- sb.append(getClass().getName());
- sb.append(" [");
- asFormulaString(sb);
- sb.append("]");
- return sb.toString();
+ return getClass().getName() + " [" + asFormulaString() + "]";
}
}
\ No newline at end of file
public NameIdentifier getLastSheetIdentifier() {
return _lastSheetIdentifier;
}
- protected void asFormulaString(StringBuffer sb) {
+ protected void asFormulaString(StringBuilder sb) {
super.asFormulaString(sb);
sb.append(':');
if (_lastSheetIdentifier.isQuoted()) {
}
@Override
public final String toString() {
- StringBuffer sb = new StringBuffer(64);
- sb.append(getClass().getName()).append(" [");
- sb.append(_operator.getRepresentation());
- sb.append(getValueText());
- sb.append("]");
- return sb.toString();
+ return getClass().getName() + " [" + _operator.getRepresentation() + getValueText() + "]";
}
protected abstract String getValueText();
}
*/
public static Pattern getWildCardPattern(String value) {
int len = value.length();
- StringBuffer sb = new StringBuffer(len);
+ StringBuilder sb = new StringBuilder(len);
boolean hasWildCard = false;
for(int i=0; i<len; i++) {
char ch = value.charAt(i);
printName(name);
fw.write('"');
- final Matcher m = ESC_CHARS.matcher(o.toString());
- final StringBuffer sb = new StringBuffer();
+ final String str = o.toString();
+ final Matcher m = ESC_CHARS.matcher(str);
+ int pos = 0;
while (m.find()) {
- String repl;
+ fw.append(str, pos, m.start());
String match = m.group();
switch (match) {
case "\n":
- repl = "\\\\n";
+ fw.write("\\\\n");
break;
case "\r":
- repl = "\\\\r";
+ fw.write("\\\\r");
break;
case "\t":
- repl = "\\\\t";
+ fw.write("\\\\t");
break;
case "\b":
- repl = "\\\\b";
+ fw.write("\\\\b");
break;
case "\f":
- repl = "\\\\f";
+ fw.write("\\\\f");
break;
case "\\":
- repl = "\\\\\\\\";
+ fw.write("\\\\\\\\");
break;
case "\"":
- repl = "\\\\\"";
+ fw.write("\\\\\"");
break;
default:
- repl = "\\\\u" + trimHex(match.charAt(0), 4);
+ fw.write("\\\\u");
+ fw.write(trimHex(match.charAt(0), 4));
break;
}
- m.appendReplacement(sb, repl);
+ pos = m.end();
}
- m.appendTail(sb);
- fw.write(sb.toString());
-
+ fw.append(str, pos, str.length());
fw.write('"');
return true;
}
protected boolean printObject(String name, Object o) {
openName(name+">");
- final Matcher m = ESC_CHARS.matcher(o.toString());
- final StringBuffer sb = new StringBuffer();
+ final String str = o.toString();
+ final Matcher m = ESC_CHARS.matcher(str);
+ int pos = 0;
while (m.find()) {
- String repl;
+ fw.write(str, pos, m.start());
String match = m.group();
switch (match) {
case "<":
- repl = "<";
+ fw.write("<");
break;
case ">":
- repl = ">";
+ fw.write(">");
break;
case "&":
- repl = "&";
+ fw.write("&");
break;
case "\'":
- repl = "'";
+ fw.write("'");
break;
case "\"":
- repl = """;
+ fw.write(""");
break;
default:
- repl = "&#x" + Long.toHexString(match.codePointAt(0)) + ";";
+ fw.write("&#x");
+ fw.write(Long.toHexString(match.codePointAt(0)));
+ fw.write(";");
break;
}
- m.appendReplacement(sb, repl);
+ pos = m.end();
}
- m.appendTail(sb);
- fw.write(sb.toString());
+ fw.append(str, pos, str.length());
closeName(name+">");
return true;
}
}
public String toString() {
- StringBuffer str = new StringBuffer();
- str.append(name);
- str.append(" [");
- str.append(id);
- str.append("]");
- if(mapiProperty != null) {
- str.append(" (");
- str.append(mapiProperty);
- str.append(")");
- }
- return str.toString();
+ return name + " [" + id + "]" + (mapiProperty == null ? "" : " (" + mapiProperty + ")");
}
}
* two chars
*/
private String dumpBytes(byte[] data, int offset, int len) {
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
for(int i=0; i<len; i++) {
int j = i + offset;
int b = data[j];
* Fetches the ALL the text of the powerpoint file, as a single string
*/
public String getTextAsString() {
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
List<String> textV = getTextAsVector();
for(String text : textV) {
ret.append(text);
}
public String toString(){
- StringBuffer buf = new StringBuffer();
- buf.append("AnimationInfoAtom\n");
- buf.append("\tDimColor: " + getDimColor() + "\n");
int mask = getMask();
- buf.append("\tMask: " + mask + ", 0x"+Integer.toHexString(mask)+"\n");
- buf.append("\t Reverse: " + getFlag(Reverse)+"\n");
- buf.append("\t Automatic: " + getFlag(Automatic)+"\n");
- buf.append("\t Sound: " + getFlag(Sound)+"\n");
- buf.append("\t StopSound: " + getFlag(StopSound)+"\n");
- buf.append("\t Play: " + getFlag(Play)+"\n");
- buf.append("\t Synchronous: " + getFlag(Synchronous)+"\n");
- buf.append("\t Hide: " + getFlag(Hide)+"\n");
- buf.append("\t AnimateBg: " + getFlag(AnimateBg)+"\n");
- buf.append("\tSoundIdRef: " + getSoundIdRef() + "\n");
- buf.append("\tDelayTime: " + getDelayTime() + "\n");
- buf.append("\tOrderID: " + getOrderID() + "\n");
- buf.append("\tSlideCount: " + getSlideCount() + "\n");
- return buf.toString();
+ return
+ "AnimationInfoAtom\n"+
+ "\tDimColor: " + getDimColor() + "\n" +
+ "\tMask: " + mask + ", 0x"+Integer.toHexString(mask)+"\n" +
+ "\t Reverse: " + getFlag(Reverse)+"\n" +
+ "\t Automatic: " + getFlag(Automatic)+"\n" +
+ "\t Sound: " + getFlag(Sound)+"\n" +
+ "\t StopSound: " + getFlag(StopSound)+"\n" +
+ "\t Play: " + getFlag(Play)+"\n" +
+ "\t Synchronous: " + getFlag(Synchronous)+"\n" +
+ "\t Hide: " + getFlag(Hide)+"\n" +
+ "\t AnimateBg: " + getFlag(AnimateBg)+"\n" +
+ "\tSoundIdRef: " + getSoundIdRef() + "\n" +
+ "\tDelayTime: " + getDelayTime() + "\n" +
+ "\tOrderID: " + getOrderID() + "\n" +
+ "\tSlideCount: " + getSlideCount() + "\n";
}
@Override
import java.util.Map;
import java.util.function.Supplier;
+import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.LittleEndian;
setMask(mask);
}
- public String toString(){
- StringBuffer buf = new StringBuffer();
- buf.append("ExMediaAtom\n");
- buf.append("\tObjectId: " + getObjectId() + "\n");
- buf.append("\tMask : " + getMask() + "\n");
- buf.append("\t fLoop : " + getFlag(fLoop) + "\n");
- buf.append("\t fRewind : " + getFlag(fRewind) + "\n");
- buf.append("\t fNarration : " + getFlag(fNarration) + "\n");
- return buf.toString();
+ public String toString() {
+ return GenericRecordJsonWriter.marshal(this);
}
@Override
import java.util.Map;
import java.util.function.Supplier;
+import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.LittleEndian;
out.write(_data);
}
- public String toString(){
- StringBuffer buf = new StringBuffer();
- buf.append("ExOleObjAtom\n");
- buf.append(" drawAspect: " + getDrawAspect() + "\n");
- buf.append(" type: " + getType() + "\n");
- buf.append(" objID: " + getObjID() + "\n");
- buf.append(" subType: " + getSubType() + "\n");
- buf.append(" objStgDataRef: " + getObjStgDataRef() + "\n");
- buf.append(" options: " + getOptions() + "\n");
- return buf.toString();
+ public String toString() {
+ return GenericRecordJsonWriter.marshal(this);
}
@Override
}
public String toString(){
- StringBuffer buf = new StringBuffer();
- buf.append("HeadersFootersAtom\n");
- buf.append("\tFormatId: " + getFormatId() + "\n");
- buf.append("\tMask : " + getMask() + "\n");
- buf.append("\t fHasDate : " + getFlag(fHasDate) + "\n");
- buf.append("\t fHasTodayDate : " + getFlag(fHasTodayDate) + "\n");
- buf.append("\t fHasUserDate : " + getFlag(fHasUserDate) + "\n");
- buf.append("\t fHasSlideNumber : " + getFlag(fHasSlideNumber) + "\n");
- buf.append("\t fHasHeader : " + getFlag(fHasHeader) + "\n");
- buf.append("\t fHasFooter : " + getFlag(fHasFooter) + "\n");
- return buf.toString();
+ return
+ "HeadersFootersAtom\n" +
+ "\tFormatId: " + getFormatId() + "\n" +
+ "\tMask : " + getMask() + "\n" +
+ "\t fHasDate : " + getFlag(fHasDate) + "\n" +
+ "\t fHasTodayDate : " + getFlag(fHasTodayDate) + "\n" +
+ "\t fHasUserDate : " + getFlag(fHasUserDate) + "\n" +
+ "\t fHasSlideNumber : " + getFlag(fHasSlideNumber) + "\n" +
+ "\t fHasHeader : " + getFlag(fHasHeader) + "\n" +
+ "\t fHasFooter : " + getFlag(fHasFooter) + "\n";
}
@Override
import java.util.Map;
import java.util.function.Supplier;
+import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.GenericRecordUtil;
-import org.apache.poi.util.HexDump;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil;
*/
@Override
public String toString() {
- StringBuffer out = new StringBuffer();
- out.append( "TextBytesAtom:\n");
- out.append( HexDump.dump(_text, 0, 0) );
- return out.toString();
+ return GenericRecordJsonWriter.marshal(this);
}
@Override
import java.util.Map;
import java.util.function.Supplier;
+import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.GenericRecordUtil;
-import org.apache.poi.util.HexDump;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil;
*/
@Override
public String toString() {
- StringBuffer out = new StringBuffer();
- out.append( "TextCharsAtom:\n");
- out.append( HexDump.dump(_text, 0, 0) );
- return out.toString();
+ return GenericRecordJsonWriter.marshal(this);
}
@Override
return "(Null Byte Array)";
}
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
text.append("Bytes len=").append(value.length);
text.append(" [");
@Override
public String toString() {
- StringBuffer str = new StringBuffer();
- str.append(name);
- str.append(" [");
- str.append(id);
- str.append("]");
- if (mapiProperty != null) {
- str.append(" (");
- str.append(mapiProperty);
- str.append(")");
- }
- return str.toString();
+ return name + " [" + id + "]" + (mapiProperty == null ? "" : " (" + mapiProperty + ")");
}
public static MAPIProperty get(int id) {
*/
public String getText() {
MAPIMessage msg = (MAPIMessage)document;
- StringBuffer s = new StringBuffer();
+ StringBuilder s = new StringBuilder();
// See if we can get a suitable encoding for any
// non unicode text in the file
* of emails, and does its best to return something like
* "Nick <nick@example.com>; Jim <jim@example.com>"
*/
- protected void handleEmails(StringBuffer s, String type, String displayText, StringsIterator emails) {
+ protected void handleEmails(StringBuilder s, String type, String displayText, StringsIterator emails) {
if(displayText == null || displayText.length() == 0) {
return;
}
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeSet;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.HWPFDocumentCore;
public static String getBulletText( NumberingState numberingState,
HWPFList list, char level )
{
- StringBuffer bulletBuffer = new StringBuffer();
+ StringBuilder bulletBuffer = new StringBuilder();
char[] xst = list.getNumberText( level ).toCharArray();
for ( char element : xst )
{
if ( !list.isStartAtOverriden( element )
&& numberingState.levels.containsKey( key ) )
{
- num = numberingState.levels.get( key ).intValue();
+ num = numberingState.levels.get( key );
if ( level == element )
{
num++;
- numberingState.levels.put( key, Integer.valueOf( num ) );
+ numberingState.levels.put( key, num );
}
}
else
{
num = list.getStartAt( element );
- numberingState.levels.put( key, Integer.valueOf( num ) );
+ numberingState.levels.put( key, num );
}
if ( level == element )
import java.io.IOException;
import java.io.InputStream;
-import org.apache.poi.hwpf.converter.WordToTextConverter;
-
import org.apache.poi.extractor.POIOLE2TextExtractor;
import org.apache.poi.hwpf.HWPFOldDocument;
+import org.apache.poi.hwpf.converter.WordToTextConverter;
import org.apache.poi.hwpf.usermodel.Range;
import org.apache.poi.poifs.filesystem.DirectoryNode;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
catch ( Exception exc )
{
// fall-back
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
for ( String t : getParagraphText() )
{
/**
* Add the header/footer text, if it's not empty
*/
- private void appendHeaderFooter( String text, StringBuffer out ) {
+ private void appendHeaderFooter( String text, StringBuilder out ) {
if ( text == null || text.length() == 0 )
return;
public String getHeaderText() {
HeaderStories hs = new HeaderStories( doc );
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
if ( hs.getFirstHeader() != null ) {
appendHeaderFooter( hs.getFirstHeader(), ret );
}
public String getFooterText() {
HeaderStories hs = new HeaderStories( doc );
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
if ( hs.getFirstFooter() != null ) {
appendHeaderFooter( hs.getFirstFooter(), ret );
}
}
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (escherRecords.size() == 0) {
buffer.append("No Escher Records Decoded").append("\n");
return result.toArray(new FSPA[0]);
}
- public String toString()
- {
- StringBuffer buf = new StringBuffer();
- buf.append( "[FPSA PLC size=" ).append( _byStart.size() )
- .append( "]\n" );
+ public String toString() {
+ StringBuilder buf = new StringBuilder();
+ buf.append( "[FPSA PLC size=" ).append( _byStart.size() ).append( "]\n" );
- for ( Map.Entry<Integer, GenericPropertyNode> entry : _byStart
- .entrySet() )
- {
+ for ( Map.Entry<Integer, GenericPropertyNode> entry : _byStart.entrySet() ) {
Integer i = entry.getKey();
buf.append( " " ).append(i).append( " => \t" );
- try
- {
+ try {
FSPA fspa = getFspaFromCp( i.intValue() );
buf.append(fspa);
- }
- catch ( Exception exc )
- {
+ } catch ( Exception exc ) {
buf.append( exc.getMessage() );
}
buf.append( "\n" );
data[0x1 + offset] = field_2_flt;
}
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
-
- buffer.append( "[FLD]\n" );
-
- buffer.append( " .chHolder = " );
- buffer.append( " (" ).append( getChHolder() ).append( " )\n" );
- buffer.append( " .ch = " )
- .append( getCh() ).append( '\n' );
- buffer.append( " .reserved = " )
- .append( getReserved() ).append( '\n' );
-
- buffer.append( " .flt = " );
- buffer.append( " (" ).append( getFlt() ).append( " )\n" );
- buffer.append( " .fDiffer = " )
- .append( isFDiffer() ).append( '\n' );
- buffer.append( " .fZombieEmbed = " )
- .append( isFZombieEmbed() ).append( '\n' );
- buffer.append( " .fResultDirty = " )
- .append( isFResultDirty() ).append( '\n' );
- buffer.append( " .fResultEdited = " )
- .append( isFResultEdited() ).append( '\n' );
- buffer.append( " .fLocked = " )
- .append( isFLocked() ).append( '\n' );
- buffer.append( " .fPrivateResult = " )
- .append( isFPrivateResult() ).append( '\n' );
- buffer.append( " .fNested = " )
- .append( isFNested() ).append( '\n' );
- buffer.append( " .fHasSep = " )
- .append( isFHasSep() ).append( '\n' );
-
- buffer.append( "[/FLD]\n" );
- return buffer.toString();
+ public String toString() {
+ return
+ "[FLD]\n" +
+ " .chHolder = (" + getChHolder() + " )\n" +
+ " .ch = " + getCh() + "\n" +
+ " .reserved = " + getReserved() + "\n" +
+ " .flt = (" + getFlt() + " )\n" +
+ " .fDiffer = " + isFDiffer() + "\n" +
+ " .fZombieEmbed = " + isFZombieEmbed() + "\n" +
+ " .fResultDirty = " + isFResultDirty() + "\n" +
+ " .fResultEdited = " + isFResultEdited() + "\n" +
+ " .fLocked = " + isFLocked() + "\n" +
+ " .fPrivateResult = " + isFPrivateResult() + "\n" +
+ " .fNested = " + isFNested() + "\n" +
+ " .fHasSep = " + isFHasSep() + "\n" +
+ "[/FLD]\n";
}
/**
data[0x2 + offset] = field_2_tlp_flags;
}
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
-
- buffer.append( "[TLP]\n" );
-
- buffer.append( " .itl = " );
- buffer.append( " (" ).append( getItl() ).append( " )\n" );
-
- buffer.append( " .tlp_flags = " );
- buffer.append( " (" ).append( getTlp_flags() ).append( " )\n" );
- buffer.append( " .fBorders = " )
- .append( isFBorders() ).append( '\n' );
- buffer.append( " .fShading = " )
- .append( isFShading() ).append( '\n' );
- buffer.append( " .fFont = " )
- .append( isFFont() ).append( '\n' );
- buffer.append( " .fColor = " )
- .append( isFColor() ).append( '\n' );
- buffer.append( " .fBestFit = " )
- .append( isFBestFit() ).append( '\n' );
- buffer.append( " .fHdrRows = " )
- .append( isFHdrRows() ).append( '\n' );
- buffer.append( " .fLastRow = " )
- .append( isFLastRow() ).append( '\n' );
-
- buffer.append( "[/TLP]\n" );
- return buffer.toString();
+ public String toString() {
+ return
+ "[TLP]\n" +
+ " .itl = (" + getItl() + " )\n" +
+ " .tlp_flags = (" + getTlp_flags() + " )\n" +
+ " .fBorders = " + isFBorders() + "\n" +
+ " .fShading = " + isFShading() + "\n" +
+ " .fFont = " + isFFont() + "\n" +
+ " .fColor = " + isFColor() + "\n" +
+ " .fBestFit = " + isFBestFit() + "\n" +
+ " .fHdrRows = " + isFHdrRows() + "\n" +
+ " .fLastRow = " + isFLastRow() + "\n" +
+ "[/TLP]\n";
}
/**
}
@Override
- public String toString()
- {
- if ( isEmpty() )
- return "[BRC] EMPTY";
-
- StringBuffer buffer = new StringBuffer();
-
- buffer.append( "[BRC]\n" );
-
- buffer.append( " .dptLineWidth = " );
- buffer.append( " (" ).append( getLineWidth() ).append( " )\n" );
-
- buffer.append( " .brcType = " );
- buffer.append( " (" ).append( getBorderType() ).append( " )\n" );
-
- buffer.append( " .ico = " );
- buffer.append( " (" ).append( getColor() ).append( " )\n" );
-
- buffer.append( " .dptSpace = " );
- buffer.append( " (" ).append( getSpace() ).append( " )\n" );
-
- buffer.append( " .fShadow = " );
- buffer.append( " (" ).append( isShadow() ).append( " )\n" );
-
- buffer.append( " .fFrame = " );
- buffer.append( " (" ).append( isFrame() ).append( " )\n" );
-
- return buffer.toString();
+ public String toString() {
+ return isEmpty() ? "[BRC] EMPTY" :
+ "[BRC]\n" +
+ " .dptLineWidth = (" + getLineWidth() + " )\n" +
+ " .brcType = (" + getBorderType() + " )\n" +
+ " .ico = (" + getColor() + " )\n" +
+ " .dptSpace = (" + getSpace() + " )\n" +
+ " .fShadow = (" + isShadow() + " )\n" +
+ " .fFrame = (" + isFrame() + " )\n";
}
}
import java.io.ByteArrayInputStream;
import junit.framework.TestCase;
-
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.formula.ptg.RefPtg;
public void testLongRecords() {
int[] lengths = {1024, 2048, 4096, 8192, 16384}; //test against strings of different length
for (int length : lengths) {
- StringBuffer buff = new StringBuffer(length);
+ StringBuilder buff = new StringBuilder(length);
for (int j = 0; j < length; j++) {
buff.append("x");
}