code: private static boolean decodeString(InputStream stream, List<String> lineArray, Charset charset) throws IOException {
  		try {
  			final BufferedReader breader = new BufferedReader(
  					new InputStreamReader(stream, charset.newDecoder()));
  
  			lineArray.clear();
  
  			String line;
  			while ((line = breader.readLine()) != null) {
  				lineArray.add(line);
  			}
  
  			return true;
  		} catch (CharacterCodingException exception) {
  			//
  		}
  		return false;
  	}
docs: Decode the bytes from the specified input stream
  according to a charset selection. This function tries
  to decode a string from the given byte array
  with the following charsets (in preferred order).
  
  <p>This function read the input stream line by line.
  
  @param stream is the stream to decode.
  @param lineArray is the array of lines to fill.
  @param charset is the charset to use.
  @return <code>true</code> is the decoding was successful,
  otherwhise <code>false</code>
  @throws IOException when the stream cannot be read.