Ejemplo n.º 1
0
 /** @return the thread encoded as data */
 public byte[] getBytes() {
   byte[] data = new byte[512];
   BigEndian.setInt16(data, 0, recordType);
   BigEndian.setInt32(data, 4, (int) parentId.getId());
   System.arraycopy(parentId.getBytes(), 0, data, 4, 4);
   System.arraycopy(nodeName.getBytes(), 0, data, 8, nodeName.getBytes().length);
   return data;
 }
Ejemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see org.jnode.fs.hfsplus.tree.AbstractKey#getBytes()
  */
 public byte[] getBytes() {
   int length = this.getKeyLength();
   byte[] data = new byte[length];
   BigEndian.setInt16(data, 0, length);
   System.arraycopy(parentId.getBytes(), 0, data, 2, 4);
   System.arraycopy(nodeName.getBytes(), 0, data, 6, (nodeName.getLength() * 2) + 2);
   return data;
 }