Esempio n. 1
0
 @Override
 public ByteBuffer write(ByteBuffer buff, Object obj) {
   Object[] array = (Object[]) obj;
   for (int i = 0; i < arrayLength; i++) {
     DataType t = elementTypes[i];
     Object o = array[i];
     if (o == null) {
       buff.put((byte) 0);
     } else {
       buff.put((byte) 1);
       buff = t.write(buff, o);
     }
   }
   return buff;
 }