com.oracle.coherence.common.io.OutputStreaming Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of coherence Show documentation
Show all versions of coherence Show documentation
Oracle Coherence Community Edition
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.oracle.coherence.common.io;
import java.io.IOException;
/**
* This is the interface represented by the Java OutputStream class.
*
* @author cp 2005.01.18
*/
public interface OutputStreaming
{
// ----- OutputStream methods -------------------------------------------
/**
* Writes the eight low-order bits of the argument b
. The 24
* high-order bits of b
are ignored.
*
* @param b the byte to write (passed as an integer)
*
* @exception java.io.IOException if an I/O error occurs
*/
public void write(int b)
throws IOException;
/**
* Writes all the bytes in the array ab
.
*
* @param ab the byte array to write
*
* @exception IOException if an I/O error occurs
* @exception NullPointerException if ab
is
* null
*/
public void write(byte ab[])
throws IOException;
/**
* Writes cb
bytes starting at offset of
from
* the array ab
.
*
* @param ab the byte array to write from
* @param of the offset into ab
to start writing from
* @param cb the number of bytes from ab
to write
*
* @exception IOException if an I/O error occurs
* @exception NullPointerException if ab
is
* null
* @exception IndexOutOfBoundsException if of
is negative,
* or cb
is negative, or of+cb
is
* greater than ab.length
*/
public void write(byte ab[], int of, int cb)
throws IOException;
/**
* Flushes this OutputStream and forces any buffered output bytes to be
* written.
*
* @exception IOException if an I/O error occurs
*/
public void flush()
throws IOException;
/**
* Closes this OutputStream and releases any associated system resources.
*
* @exception IOException if an I/O error occurs
*/
public void close()
throws IOException;
}