Avoiding API Methods with Implicit Object Allocations
class MyByteArrayOutputStream extends ByteArrayOutputStream {
public MyByteArrayOutputStream() {
super();
}
public MyByteArrayOutputStream(int capacity) {
super(capacity);
}
}
public byte[] getByteArray() {
return buf;
}
Previous slide
Next slide
Back to first slide
View graphic version