code: public synchronized int write(int plane, ByteBuffer buffer) {
  		byte[] data = new byte[buffer.limit()];
  		buffer.get(data);
  
  		return write(plane, data);
  	}
docs: Write as much data as possible to this buffer.
  
  @param plane  the audio channel.
  @param buffer data to be written.
  
  @return amount of data actually written