Top Description Fields Constructors Methods
com.oracle.bmc.io.internal

public final Class KeepOpenInputStream

extends FilterInputStream
Class Inheritance
Imports
java.io.FilterInputStream, .IOException, .InputStream

A wrapper around an InputStream that turns the close method into a no-op, and requires the calling of the doClose method instead.

This is necessary, because Jersey closes a stream once it has been read, but we may want to reset and read it again for retries.

Field Summary

Modifier and TypeField and Description
private static final Logger
Inherited from java.io.FilterInputStream:
in

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

Closes this input stream and releases any system resources associated with the stream.

public static void
closeStream(InputStream
input stream to close
is
)

Close a stream, dealing properly with KeepOpenInputStreams.

public void
doClose()

This method actually closes the stream, what close() is not doing.

Inherited from java.io.FilterInputStream:
availablemarkmarkSupportedreadreadreadresetskip

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

KeepOpenInputStreamback to summary
public KeepOpenInputStream(InputStream is)

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

Doc from java.io.FilterInputStream.close.

Closes this input stream and releases any system resources associated with the stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
closeStreamback to summary
public static void closeStream(InputStream is)

Close a stream, dealing properly with KeepOpenInputStreams.

Parameters
is:InputStream

input stream to close

doCloseback to summary
public void doClose() throws IOException

This method actually closes the stream, what close() is not doing.

Exceptions
IOException:
if actually closing the stream throws an exception