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 in, boolean silent)
close
if (in != null) {
    try {
        in.close();
    } catch (IOException e) {
        if (!silent) {
            throw new RuntimeException(e);
voidclose(InputStream in, OutputStream out)
close
try {
    if (in != null) {
        in.close();
    if (out != null) {
        out.close();
} catch (IOException e) {
...
booleanclose(InputStream input)
Unconditionally close an InputStream.
if (null == input)
    return false;
try {
    input.close();
    return true;
} catch (IOException ioe) {
    return false;
voidclose(InputStream inputStream)
close
if (inputStream != null) {
    inputStream.close();
voidclose(InputStream inputstream)
Closes an input stream while inspecting its class.
if (inputstream != null) {
    String inputstreamClassName = inputstream.getClass().getName();
    if (!inputstreamClassName.startsWith("sun.net.www.protocol.jar.JarURLConnection")) {
        inputstream.close();
voidclose(InputStream inputStream)
close
try {
    inputStream.close();
} catch (IOException ioe) {
    throw new RuntimeException("Failed to close input stream.", ioe);
voidclose(InputStream is)
Close an InputStream
if (is != null) {
    try {
        is.close();
    } catch (Exception ex) {
voidclose(InputStream is)
Close the input stream and trap any exceptions.
if (is != null) {
    try {
        is.close();
    } catch (Exception ex) {
voidclose(InputStream is)
Closes an input stream ignoring any errors.
if (is == null)
    return;
try {
    is.close();
} catch (IOException ignoreEx) {
voidclose(InputStream is)
close
try {
    if (is != null)
        is.close();
} catch (Throwable t) {