public byte[] readObjectAsByteArray(final PdfObject pdfObject,final boolean isCompressed,final int objectID,final int gen){
  byte[] raw=null;
  if (linHintTable != null) {
    raw=linHintTable.getObjData(objectID);
  }
  if (raw == null) {
    if (isCompressed) {
      raw=readCompressedObjectAsByteArray(pdfObject,objectID,gen);
    }
 else {
      movePointer(offset.elementAt(objectID));
      if (ObjLengthTable == null || offset.isRefTableInvalid()) {
        raw=objectReader.readObjectData(-1,pdfObject);
      }
 else       if (objectID > ObjLengthTable.length) {
        return null;
      }
 else {
        raw=objectReader.readObjectData(ObjLengthTable[objectID],pdfObject);
      }
    }
  }
  int j=0;
  if (raw.length > 15) {
    for (int i2=0; i2 < 10; i2++) {
      if (raw[i2] == 'o' && raw[i2 + 1] == 'b' && raw[i2 + 2] == 'j') {
        break;
      }
 else       if (raw[i2] == 'e' && raw[i2 + 1] == 'n' && raw[i2 + 2] == 'd' && raw[i2 + 3] == 'o' && raw[i2 + 4] == 'b' && raw[i2 + 5] == 'j') {
        j=i2 + 6;
        objectReader.fileIsBroken=true;
        break;
      }
    }
  }
  while (raw[j] == 10 || raw[j] == 12 || raw[j] == 32) {
    j++;
  }
  if (j > 0) {
    final byte[] oldBuffer=raw;
    final int newLength=raw.length - j;
    raw=new byte[newLength];
    System.arraycopy(oldBuffer,j,raw,0,newLength);
  }
  return raw;
}

public byte [ ] readObjectAsByteArray ( final PdfObject pdfObject , final boolean isCompressed , final int objectID , final int gen ) { byte [ ] raw = null ; if ( linHintTable != null ) { raw = linHintTable . getObjData ( objectID ) ; } if ( raw == null ) { if ( isCompressed ) { raw = readCompressedObjectAsByteArray ( pdfObject , objectID , gen ) ; } else { movePointer ( offset . elementAt ( objectID ) ) ; if ( ObjLengthTable == null || offset . isRefTableInvalid ( ) ) { raw = objectReader . readObjectData ( - 1 , pdfObject ) ; } else if ( objectID > ObjLengthTable . length ) { return null ; } else { raw = objectReader . readObjectData ( ObjLengthTable [ objectID ] , pdfObject ) ; } } } int j = 0 ; if ( raw . length > 15 ) { for ( int i2 = 0 ; i2 < 10 ; i2 ++ ) { if ( raw [ i2 ] == 'o' && raw [ i2 + 1 ] == 'b' && raw [ i2 + 2 ] == 'j' ) { break ; } else if ( raw [ i2 ] == 'e' && raw [ i2 + 1 ] == 'n' && raw [ i2 + 2 ] == 'd' && raw [ i2 + 3 ] == 'o' && raw [ i2 + 4 ] == 'b' && raw [ i2 + 5 ] == 'j' ) { j = i2 + 6 ; objectReader . fileIsBroken = true ; break ; } } } while ( raw [ j ] == 10 || raw [ j ] == 12 || raw [ j ] == 32 ) { j ++ ; } if ( j > 0 ) { final byte [ ] oldBuffer = raw ; final int newLength = raw . length - j ; raw = new byte [ newLength ] ; System . arraycopy ( oldBuffer , j , raw , 0 , newLength ) ; } return raw ; }
get object as byte [ ]
