Since a copy is not made, users must be careful that no more writes are made to the stream if the array reference is handed off.
Users of this must make the modifications *before* the next write is done, and then release their hold on the array.
1919192019211922192319241925192619271928
private AccessibleByteArrayOutputStream tmpArray; private boolean dumpedTempWriter; private PrintWriter getTempWriter() { if (tmpWriter == null && !dumpedTempWriter) { tmpArray = new AccessibleByteArrayOutputStream(); tmpWriter = new PrintWriter(tmpArray); } return tmpWriter; }
1933193419351936193719381939194019411942
44454647484950
public ClassFormatOutput() { this(512); } public ClassFormatOutput(int size) { super(new AccessibleByteArrayOutputStream(size)); }
1953195419551956195719581959196019611962
45464748495051
public ClassFormatOutput() { this(512); } public ClassFormatOutput(int size) { this(new AccessibleByteArrayOutputStream(size)); }
1927192819291930193119321933193419351936
1931193219331934193519361937193819391940