Java ByteBuffer Write writeByteArray(byte[] data, ByteBuffer buffer)

Here you can find the source of writeByteArray(byte[] data, ByteBuffer buffer)

Description

write Byte Array

License

Open Source License

Declaration

public static void writeByteArray(byte[] data, ByteBuffer buffer) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import java.nio.ByteBuffer;

public class Main {
    public static void writeByteArray(byte[] data, ByteBuffer buffer) throws IOException {
        buffer.put(data);/* w  w w . ja va2 s.  c om*/
    }

    public static void writeByteArray(byte[] data, int offset, int length, ByteBuffer buffer) throws IOException {
        buffer.put(data, offset, length);
    }
}

Related

  1. writeBuffer(ByteChannel channel, ByteBuffer buffer)
  2. writeBuffer(FileChannel fc, ByteBuffer buf, int startPos)
  3. writeBuffer(WritableByteChannel chan, ByteBuffer buf)
  4. writeByte(ByteBuffer dest, int off, int i)
  5. writeByteArray(byte[] array, ByteBuffer out)
  6. writeByteArray(ByteBuffer byteBuffer, byte[] bytes)
  7. writeByteArray(ByteBuffer logBuf, byte[] b)
  8. writeByteBuffer(ByteBuffer bbuf, String filename)
  9. writeByteBuffer(RandomAccessFile file, ByteBuffer buffer)