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

io.github.mmm.binary.Streamable Maven / Gradle / Ivy

There is a newer version: 0.9.8
Show newest version
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.binary;

import java.io.InputStream;
import java.io.OutputStream;

/**
 * Interface for an abstract BLOB that can be streamed.
 *
 * @since 1.0.0
 */
public interface Streamable {

  /**
   * @param out the {@link OutputStream} to {@link OutputStream#write(byte[]) write} the data to.
   */
  void save(OutputStream out);

  /**
   * @return a new {@link InputStream} to read the underlying data.
   */
  InputStream asStream();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy