/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * <b>TODO</b> Consider making this method throw UnsupportedEncodingException. * * @return The contents of the file, as a string. */ @Override public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = DEFAULT_CHARSET; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }
/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * @return The contents of the file, as a string. * * TODO Consider making this method throw UnsupportedEncodingException. */ @Override public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = DEFAULT_CHARSET; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }
/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * @return The contents of the file, as a string. * * TODO Consider making this method throw UnsupportedEncodingException. */ public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = DEFAULT_CHARSET; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }
/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * @return The contents of the file, as a string. * * TODO Consider making this method throw UnsupportedEncodingException. */ public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = DEFAULT_CHARSET; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }
/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * <b>TODO</b> Consider making this method throw UnsupportedEncodingException. * * @return The contents of the file, as a string. */ @Override public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = DEFAULT_CHARSET; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }
/** * Returns the contents of the file as a String, using the default * character encoding. This method uses {@link #get()} to retrieve the * contents of the file. * * <b>TODO</b> Consider making this method throw UnsupportedEncodingException. * * @return The contents of the file, as a string. */ @Override public String getString() { byte[] rawdata = get(); String charset = getCharSet(); if (charset == null) { charset = defaultCharset; } try { return new String(rawdata, charset); } catch (UnsupportedEncodingException e) { return new String(rawdata); } }