ma.vi.base.io.DirectAccessByteArrayOutputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.vikmad.base Show documentation
Show all versions of com.vikmad.base Show documentation
Base algos, data structures and utilities
The newest version!
/*
* Copyright (c) 2018 Vikash Madhow
*/
package ma.vi.base.io;
import java.io.ByteArrayOutputStream;
/**
* Same as java.io.ByteArrayOutputStream but provides public access to the underlying byte array. This is useful when
* you do not want a copy of underlying byte buffer made (which toByteArray() method does).
*
* @author [email protected]
*/
public class DirectAccessByteArrayOutputStream extends ByteArrayOutputStream {
public byte[] getBuffer() {
return buf;
}
public int getCount() {
return count;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy