Class Decompressor

java.lang.Object
net.sourceforge.plantuml.code.deflate.Decompressor

public final class Decompressor extends java.lang.Object
Decompresses raw DEFLATE data (without zlib or gzip container) into bytes.
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    Reads from the specified input stream, decompress the data, and returns a new byte array.
    static void
    Reads from the specified input stream, decompress the data, and writes to the specified output stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • decompress

      public static byte[] decompress(BitInputStream in) throws java.io.IOException, java.util.zip.DataFormatException
      Reads from the specified input stream, decompress the data, and returns a new byte array.
      Parameters:
      in - the bit input stream to read from (not null)
      Throws:
      java.lang.NullPointerException - if the input stream is null
      java.util.zip.DataFormatException - if the DEFLATE data is malformed
      java.io.IOException
    • decompress

      public static void decompress(BitInputStream in, OutputStreamProtected out) throws java.io.IOException, java.util.zip.DataFormatException
      Reads from the specified input stream, decompress the data, and writes to the specified output stream.
      Parameters:
      in - the bit input stream to read from (not null)
      out - the byte output stream to write to (not null)
      Throws:
      java.lang.NullPointerException - if the input or output stream is null
      java.util.zip.DataFormatException - if the DEFLATE data is malformed
      java.io.IOException