Skip to content

Commit db124b1

Browse files
committed
OutputStream subclasses add 秘setBytes(byte[] b)
1 parent eec6aa0 commit db124b1

File tree

4 files changed

+375
-352
lines changed

4 files changed

+375
-352
lines changed

sources/net.sf.j2s.java.core/src/java/io/BufferedOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private void flushBuffer() throws IOException {
8383
count = 0;
8484
}
8585
}
86-
86+
8787
/**
8888
* Writes the specified byte to this buffered output stream.
8989
*

sources/net.sf.j2s.java.core/src/java/io/ByteArrayOutputStream.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public class ByteArrayOutputStream extends OutputStream {
5454
*/
5555
protected int count;
5656

57+
public boolean 秘setBytes(byte[] b) {
58+
buf = b;
59+
count = b.length;
60+
return true;
61+
}
62+
5763
/**
5864
* Creates a new byte array output stream. The buffer capacity is
5965
* initially 32 bytes, though its size increases if necessary.

0 commit comments

Comments
 (0)