uk.ac.starlink.parquet

## Class ParquetUtil

- java.lang.Object
- - uk.ac.starlink.parquet.ParquetUtil

-     public class ParquetUtil
      extends java.lang.Object

  Utility classes for Parquet I/O.
  Since:
    26 Feb 2021

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static uk.ac.starlink.parquet.ParquetIO` | `getIO()` Returns the ParquetIO object that handles all the parquet-mr-dependent I/O.
    `static boolean` | `isMagic(byte[] buffer)` Indicates whether the given buffer starts with the Parquet file format magic number, "PAR1".

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isMagic

          public static boolean isMagic(byte[] buffer)

      Indicates whether the given buffer starts with the Parquet file format magic number, "PAR1". Note that Parquet files have to both start and end with this sequence.
      Parameters:
        `buffer` - byte content
      Returns:
        true iff the first four bytes in the buffer are ASCII "PAR1"

    - #### getIO

          public static uk.ac.starlink.parquet.ParquetIO getIO()
                                                        throws java.io.IOException

      Returns the ParquetIO object that handles all the parquet-mr-dependent I/O. If the parquet-mr libraries are not present, an IOException with a suitable message will be thrown.
      Returns:
        parquetIO object, not null
      Throws:
        `java.io.IOException` - if libraries are not present