Code example for BufferedInputStream

Methods: closeread

0
			return null; 
 
		byte[] buffer = new byte[(int) file.length()];
		BufferedInputStream f = null;
		try { 
			f = new BufferedInputStream(new FileInputStream(file));
			f.read(buffer);
		} finally { 
			if (f != null)
				try { 
					f.close();
				} catch (IOException ignored) {
				} 
		} 
		return new String(buffer);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE