public static String getStringFromFile(File location) { InputStream is = null; String result = null; try { is = new FileInputStream(location); result = normalizeCRLF(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (Exception e) { //do nothing } } } return result; }
public static String getStringFromFile(File location) { InputStream is = null; String result = null; try { is = Files.newInputStream(location.toPath()); result = normalizeCRLF(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (Exception e) { //do nothing } } } return result; }
public static String getStringFromFile(File location) { InputStream is = null; String result = null; try { is = new FileInputStream(location); result = normalizeCRLF(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (Exception e) { //do nothing } } } return result; }
public static String getStringFromFile(File location) { InputStream is = null; String result = null; try { is = new FileInputStream(location); result = normalizeCRLF(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (Exception e) { //do nothing } } } return result; }
public static String getStringFromFile(File location) { InputStream is = null; String result = null; try { is = Files.newInputStream(location.toPath()); result = normalizeCRLF(is); } catch (Exception e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (Exception e) { //do nothing } } } return result; }