public Mp4BoxHeader(String id){
  if (id.length() != IDENTIFIER_LENGTH) {
    throw new RuntimeException("Invalid length:atom idenifier should always be 4 characters long");
  }
  dataBuffer=ByteBuffer.allocate(HEADER_LENGTH);
  try {
    this.id=id;
    dataBuffer.put(4,id.getBytes("ISO-8859-1")[0]);
    dataBuffer.put(5,id.getBytes("ISO-8859-1")[1]);
    dataBuffer.put(6,id.getBytes("ISO-8859-1")[2]);
    dataBuffer.put(7,id.getBytes("ISO-8859-1")[3]);
  }
 catch (  UnsupportedEncodingException uee) {
    throw new RuntimeException(uee);
  }
}

public Mp4BoxHeader ( String id ) { if ( id . length ( ) != IDENTIFIER_LENGTH ) { throw new RuntimeException ( "Invalid length:atom idenifier should always be 4 characters long" ) ; } dataBuffer = ByteBuffer . allocate ( HEADER_LENGTH ) ; try { this . id = id ; dataBuffer . put ( 4 , id . getBytes ( "ISO-8859-1" ) [ 0 ] ) ; dataBuffer . put ( 5 , id . getBytes ( "ISO-8859-1" ) [ 1 ] ) ; dataBuffer . put ( 6 , id . getBytes ( "ISO-8859-1" ) [ 2 ] ) ; dataBuffer . put ( 7 , id . getBytes ( "ISO-8859-1" ) [ 3 ] ) ; } catch ( UnsupportedEncodingException uee ) { throw new RuntimeException ( uee ) ; } }
construct header to allow manual creation of header for writing to file
