Here you can find the source of close(RandomAccessFile randomAccessFile)
public static void close(RandomAccessFile randomAccessFile)
//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); } } } }