Java Utililty Methods ByteBuffer to OutputStream

List of utility methods to do ByteBuffer to OutputStream

Description

The list of methods to do ByteBuffer to OutputStream are organized into topic(s).

Method

OutputStreamnewOutputStream(final ByteBuffer buf)
new Output Stream
return new OutputStream() {
    public synchronized void write(int b) throws IOException {
        try {
            buf.put((byte) b);
        } catch (BufferOverflowException e) {
            throw new IOException(e);
    public synchronized void write(byte[] bytes, int off, int len) throws IOException {
        try {
            buf.put(bytes, off, len);
        } catch (BufferOverflowException e) {
            throw new IOException(e);
};
OutputStreamnewOutputStream(final ByteBuffer dst)
new Output Stream
return new OutputStream() {
    public void write(int b) throws IOException {
        dst.put((byte) b);
    public void write(byte[] bytes, int off, int len) throws IOException {
        dst.put(bytes, off, len);
};
...