All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eurodyn.qlack.fuse.cm.util.StreamsUtil Maven / Gradle / Ivy

There is a newer version: 3.6.8
Show newest version
package com.eurodyn.qlack.fuse.cm.util;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.zip.ZipOutputStream;

/**
 * A Util class for the DocumentService class operations.
 *
 * @author European Dynamics SA
 */
public class StreamsUtil {

  /**
   * Private Constructor
   */
  private StreamsUtil() {
  }

  /**
   * Creates a new instance of the ZipOutputStream class.
   *
   * @param outStream the output stream
   * @return the ZipOutputStream instance
   */
  public static ZipOutputStream createZipOutputStream(ByteArrayOutputStream outStream) {
    return new ZipOutputStream(outStream);
  }

  /**
   * Creates a new instance of the InputStream class.
   *
   * @param fileContent the byte content
   * @return the InputStream instance
   */
  public static InputStream createInputStream(byte[] fileContent) {
    return new ByteArrayInputStream(fileContent);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy