writing ByteBuffer.c