private static boolean isValidHeaderMagic ( OrcDataSource source ) throws IOException { byte [ ] headerMagic = new byte [ MAGIC . length ( ) ] ; source . readFully ( 0 , headerMagic ) ; return MAGIC . equals ( Slices . wrappedBuffer ( headerMagic ) ) ; }
Does the file start with the ORC magic bytes?