Class IOUtils

java.lang.Object
com.igormaznitsa.meta.common.utils.IOUtils

public final class IOUtils extends Object
Auxiliary methods for IO operations.
Since:
1.0
  • Constructor Details

    • IOUtils

      private IOUtils()
  • Method Details

    • packData

      @Weight(VARIABLE) public static byte[] packData(byte[] data)
      Pack some binary data.
      Parameters:
      data - data to be packed
      Returns:
      packed data as byte array
      Since:
      1.0
    • unpackData

      @Weight(VARIABLE) public static byte[] unpackData(byte[] data)
      Unpack binary data packed by the packData method.
      Parameters:
      data - packed data array
      Returns:
      unpacked byte array
      Throws:
      IllegalArgumentException - it will be thrown if the data has wrong format, global error listeners will be also notified
      Since:
      1.0
      See Also:
    • closeQuetly

      @Weight(LIGHT) public static Closeable closeQuetly(Closeable closeable)
      Closing quetly any closeable object. Any exception will be caught (but global error listeners will be notified)
      Parameters:
      closeable - object to be closed quetly
      Returns:
      the same object provided in args
      Since:
      1.0