public boolean readHeader(RandomAccessFile raf) throws IOException {
  StringBuffer id=new StringBuffer(4);
  for (int i=0; i < 4; i++) {
    int ch=raf.read();
    if (ch < 32) {
      String hx=Integer.toHexString(ch);
      if (hx.length() < 2) {
        hx="0" + hx;
      }
      return false;
    }
    id.append((char)ch);
  }
  _chunkID=id.toString();
  _size=AiffUtil.readUINT32(raf);
  return true;
}

public boolean readHeader ( RandomAccessFile raf ) throws IOException { StringBuffer id = new StringBuffer ( 4 ) ; for ( int i = 0 ; i < 4 ; i ++ ) { int ch = raf . read ( ) ; if ( ch < 32 ) { String hx = Integer . toHexString ( ch ) ; if ( hx . length ( ) < 2 ) { hx = "0" + hx ; } return false ; } id . append ( ( char ) ch ) ; } _chunkID = id . toString ( ) ; _size = AiffUtil . readUINT32 ( raf ) ; return true ; }
reads the header of a chunk . if _chunkid is non - null , it ' s assumed to have already been read .
