Java Utililty Methods InputStream Close

List of utility methods to do InputStream Close

Description

The list of methods to do InputStream Close are organized into topic(s).

Method

voidclose(InputStream is)
close
if (is == null) {
    return;
try {
    is.close();
} catch (IOException e) {
    throw new IllegalStateException(e);
voidclose(InputStream is)
close
if (is == null) {
    return;
try {
    is.close();
} catch (Exception e) {
    System.err.println("can't close InputStream: " + e);
voidclose(InputStream is)
close
if (is != null) {
    try {
        is.close();
    } catch (IOException e) {
voidclose(InputStream is)
close
is.close();
voidclose(InputStream is)
close
try {
    if (is != null)
        is.close();
} catch (IOException e) {
    e.printStackTrace();
voidclose(InputStream is, boolean success)
close
try {
    is.close();
} catch (IOException e) {
    if (success) {
        throw new RuntimeException(e);
    e.printStackTrace();
voidclose(InputStream is, OutputStream os)
close
if (is != null)
    try {
        is.close();
    } catch (IOException e) {
if (os != null)
    try {
        os.close();
...
voidforceClose(Closeable stream)
force Close
if (stream != null) {
    try {
        stream.close();
    } catch (Throwable t) {
voidforceClosed(InputStream stream)
force Closed
if (stream != null) {
    try {
        stream.close();
    } catch (IOException e) {