Reads all lines and return as a String array.

@return The String array.

@throws IOException If an I/O error occurs.
769507
public String[] readLines() throws IOException {

        List<String> list = new ArrayList<String>();
        String line;
        while ((line = readLine()) != null) {
            list.add(line);
        }

        return list.toArray(new String[0]);
    }
165338
@JSFunction
    public String readChar() throws IOException {
        int i = getReader().read();
        if (i == -1)
            return null;
        char[] charArray = { (char) i };
        return new String(charArray);
    }
23161
public String[] readComments() throws IOException {
        List<String> list = new LinkedList<String>();
        while (true) {
            mark(1024); // Line length equal 1024 at most
            String line = readTrimmedLine();
            if (line.length() > 0)
                if (line.charAt(0) != '%') {
                    reset();
                    break;
                } else
                    list.add(line.substring(1));
        }
        return list.toArray(new String[list.size()]);
    }
507827
private String readLine() throws IOException {
    StringBuffer sbuf = new StringBuffer();
    int result;
    String line;

    do {
      result = in.readLine(buf, 0, buf.length);  // does +=
      if (result != -1) {
        sbuf.append(new String(buf, 0, result, encoding));
      }
    } while (result == buf.length);  // loop only if the buffer was filled

    if (sbuf.length() == 0) {
      return null;  // nothing read, must be at the end of stream
    }

    // Cut off the trailing \n or \r\n
    // It should always be \r\n but IE5 sometimes does just \n
    // Thanks to Luke Blaikie for helping make this work with \n
    int len = sbuf.length();
    if (len >= 2 && sbuf.charAt(len - 2) == '\r') {
      sbuf.setLength(len - 2);  // cut \r\n
    }
    else if (len >= 1 && sbuf.charAt(len - 1) == '\n') {
      sbuf.setLength(len - 1);  // cut \n
    }
    return sbuf.toString();
  }
1300705
public static List<String> toLines(final InputStream input) throws IOException {
		return CharStreams.readLines(new BufferedReader(new InputStreamReader(input, Charsets.UTF_8)));
	}
705961
public String readString() throws IOException {
    final int size = readRawVarint32();
    if (size <= (bufferSize - bufferPos) && size > 0) {
      // Fast path:  We already have the bytes in a contiguous buffer, so
      //   just copy directly from it.
      final String result = new String(buffer, bufferPos, size, "UTF-8");
      bufferPos += size;
      return result;
    } else {
      // Slow path:  Build a byte array first then copy it.
      return new String(readRawBytes(size), "UTF-8");
    }
  }
431641
public String next() throws IOException {
        if (done) {
            return null;
        }
        for (;;) {
            if (line == null) {
                line = reader.readLineSkippingComments();
                if (line == null) {
                    done = true;
                    return null;
                }
                pos = 0;
            }
            buf.setLength(0);
            lastpos = pos;
            pos = nextToken(pos);
            if (pos < 0) {
                line = null;
                continue;
            }
            return buf.toString();
        }
    }
628561
public static List<String> readToList(Reader r) throws IOException {
		try ( BufferedReader in = new BufferedReader(r) ) {
			List<String> l = new ArrayList<>();
			String line = null;
			while ((line = in.readLine()) != null)
				l.add(line);
			return Collections.unmodifiableList(l);
		}
	}
563944
public static String readlineFromStdIn() throws IOException {
		StringBuilder ret = new StringBuilder();
		int c;
		while ((c = System.in.read()) != '\n' && c != -1) {
			if (c != '\r')
				ret.append((char) c);
		}
		return ret.toString();
	}
1284681
private String[] readLine() throws IOException {
        // Read the next number of non zeros.
        String line = reader.readLine();
        if (line == null)
            throw new IllegalArgumentException(
                    "The matrix file is improperly formatted");
        return line.split("\\s+");
    }
1353854
@Override
	public String readLine() throws IOException {

		if (bufferedReader != null) {

			return bufferedReader.readLine();
		} else if (raf != null) {
			return raf.readLine();
		} else {
			return otherLineReader.readLine();
		}
	}
352966
public List<MapRow> read() throws IOException
   {
      List<MapRow> result = new ArrayList<MapRow>();
      int fileCount = m_stream.readInt();
      if (fileCount != 0)
      {
         for (int index = 0; index < fileCount; index++)
         {
            // We use a LinkedHashMap to preserve insertion order in iteration
            // Useful when debugging the file format.
            Map<String, Object> map = new LinkedHashMap<String, Object>();
            readBlock(map);
            result.add(new MapRow(map));
         }
      }
      return result;
   }
1122691
public byte[] readLine(int offset) throws IOException {
		int lastIndex = -1;
		int localOffset = offset;
		int read;
		do {
			read = ensureBuffer(localOffset, BUFFER_SIZE);
			if (read <= 0) {
				// EOF
				this.pos = this.buffer.length;
				return null;
			}

			// NOT EOF, search for end of line
			final int end = localOffset + read;
			for (int idx = localOffset; (lastIndex == -1) && (idx < this.buffer.length) && (idx < end); ++idx) {
				if ((this.buffer[idx] == '\n') || (this.buffer[idx] == '\r')) {
					lastIndex = idx;
				}
			}
			localOffset += read;
		}
		while (lastIndex == -1);
		this.pos = lastIndex;
		return Arrays.copyOfRange(this.buffer, offset, lastIndex);
	}
531080
public Object[] readArray() throws IOException
    {
        if (_parser.isExpectedStartArrayToken()) {
            return AnyReader.std.readArrayFromArray(this, _parser, _collectionBuilder);
        }
        if (_parser.hasToken(JsonToken.VALUE_NULL)) {
            return null;
        }
        throw JSONObjectException.from(_parser,
                "Can not read an array: expect to see START_ARRAY ('['), instead got: "+ValueReader._tokenDesc(_parser));
    }
781530
public static List<String> toLines(final Reader input) throws IOException {
		return CharStreams.readLines(toBufferedReader(input));
	}
490309
private String[] readLine(BufferedReader r) throws IOException
	{
		System.out.print("> ");
		final String line = r.readLine();
		return line != null ? split(line) : null;
	}
608370
public static String readAllToString(final InputStream in) throws IOException {
    return new String(readAllToBytes(in), StandardCharsets.UTF_8);
  }