Class Writer

java.lang.Object
org.opentrafficsim.base.compressedfiles.Writer

public final class Writer
extends Object
Writer for compressed files.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Oct 24, 2018
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • createOutputStream

      public static OutputStream createOutputStream​(String fileName, CompressionType compressionType) throws IOException
      Construct a new OutputStream that performs a requested data compression.
      Parameters:
      fileName - String; name of the file that will be created (possible
      compressionType - CompressionType; the type of data compression to use
      Returns:
      OutputStream that accepts data to write and should eventually be closed
      Throws:
      IOException - when the requested file could not be opened for writing, or the compression type is unknown