Java Stream Close close(RandomAccessFile randomAccessFile)

Here you can find the source of close(RandomAccessFile randomAccessFile)

Description

close

License

Apache License

Declaration

public static void close(RandomAccessFile randomAccessFile) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;

import java.io.OutputStream;
import java.io.RandomAccessFile;

public class Main {
    public static void close(RandomAccessFile randomAccessFile) {
        if (randomAccessFile != null) {
            try {
                randomAccessFile.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }/*from   w w  w.  j  a  v a 2s .c om*/
        }
    }

    public static void close(OutputStream os) {
        if (os != null) {
            try {
                os.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}

Related

  1. close(OutputStream in)
  2. close(OutputStream os)
  3. close(OutputStream s)
  4. close(PrintStream writer)
  5. close(Process process)
  6. close(Writer out)
  7. close(Writer stream)
  8. close(ZipFile file)
  9. close(ZipFile file)