List of utility methods to do FileInputStream Read
InputStream | fastStream(File file) fast Stream if (file == null) { throw new IllegalArgumentException( "Passed null file to fastStream"); FileChannel fc = null; byte[] bytes = null; try { FileInputStream fis = new FileInputStream(file); ... |
void | readSomeDataFromFile(String path, byte[] data) read Some Data From File InputStream is = null; try { File file = new File(path); is = new FileInputStream(file); is.read(data); } catch (IOException e) { e.printStackTrace(); } finally { ... |
String[] | getCredentials(FileInputStream fis) get Credentials byte[] inputData = new byte[50]; String[] data = null; int length = 0; try { length = fis.read(inputData, 0, 50); } catch (IOException e) { e.printStackTrace(); if (length > 0) { String inputString = new String(inputData); data = inputString.split(";"); return data; |