Class Writer

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

public final class Writer
extends java.lang.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 Summary

    Modifier and Type Method Description
    static java.io.OutputStream createOutputStream​(java.lang.String fileName, CompressionType compressionType)
    Construct a new OutputStream that performs a requested data compression.

    Methods inherited from class java.lang.Object

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

    • createOutputStream

      public static java.io.OutputStream createOutputStream​(java.lang.String fileName, CompressionType compressionType) throws java.io.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:
      java.io.IOException - when the requested file could not be opened for writing, or the compression type is unknown