예제 #1
0
 public Atom(FileAccessor input) throws IOException {
   offset = input.getFilePointer();
   // get atom size
   size = input.readInt();
   // get atom type
   byte[] atomTypeFCC = new byte[4];
   input.readFully(atomTypeFCC);
   type = new String(atomTypeFCC);
   if (size == 1) {
     // 64 bit size. Read new size from body and store it
     size = input.readLong();
   }
   // skip back to atom start
   input.seek(offset);
 }
예제 #2
0
 public void fillBuffer(FileAccessor input) throws IOException {
   buffer = new byte[(int) size];
   input.readFully(buffer);
 }