cdm/src/main/java/ucar/nc2/stream/NcStreamWriterChannel.java
private int writeBytes(WritableByteChannel wbc, byte[] b) throws IOException {
    return wbc.write(ByteBuffer.wrap(b));
  }
private int writeBytes(WritableByteChannel wbc, byte[] b) throws IOException {
    return wbc.write(ByteBuffer.wrap(b));
  }
private int writeBytes ( WritableByteChannel wbc , byte [ ] b ) throws IOException { return wbc . write ( ByteBuffer . wrap ( b ) ) ; }
/* public long sendData(WritableByteChannel wbc, StructureData sdata) throws IOException {
long size = 0;
ByteBuffer bb = IospHelper.copyToByteBuffer(sdata);
byte[] datab = bb.array();
size += writeBytes(wbc, NcStream.MAGIC_DATA); // magic
size += NcStream.writeVInt(wbc, datab.length); // data len
size += writeBytes(wbc, datab); // data
return size;
}
/ * public long sendData ( WritableByteChannel wbc StructureData sdata ) throws IOException { long size = 0 ; ByteBuffer bb = IospHelper . copyToByteBuffer ( sdata ) ; byte [] datab = bb . array () ; size + = writeBytes ( wbc NcStream . MAGIC_DATA ) ; // magic size + = NcStream . writeVInt ( wbc datab . length ) ; // data len size + = writeBytes ( wbc datab ) ; // data return size ; }