Read a <code>Process</code> from a <code>Reader</code>.

@param reader
The reader containing the rule-set.

@return The rule-set.
332277
public List<Process> read(final Reader reader) throws SAXException,
                                                 IOException {
        this.processes = ((ProcessBuildData) this.parser.read( reader )).getProcesses();
        return this.processes;
    }
791861
private void parseControlSequence(Reader reader) throws IOException {
		boolean finishedSequence = false;
		StringBuilder parameters = new StringBuilder();
		int character;
		while ((character = reader.read()) != -1) {
			if ((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z')) {
				String[] array = parameters.toString().split(";");
				AnsiControlSequence seq = new AnsiControlSequence((char) character, array);
				listener.parsedControlSequence(seq);

				finishedSequence = true;
				break;
			} else {
				parameters.append((char) character);
			}
		}
		if (!finishedSequence) {
			// not an ideal solution if they used the two byte CSI, but it's
			// easier and cleaner than keeping track of it
			buffer.append((char) SINGLE_CSI);
			buffer.append(parameters);
		}
	}
5012
public List<MapRow> readTable(TableReader reader) throws IOException
   {
      reader.read();
      return reader.getRows();
   }
713285
private static BufferedReader createReader( Process process )
    {
        InputStream inputStream = process.getInputStream();
        InputStreamReader in = new InputStreamReader( inputStream );
        BufferedReader reader = new BufferedReader( in );
        return reader;
    }
897588
public final static String process(final Reader reader, final boolean safeMode) throws IOException
    {
        return process(reader, Configuration.builder().setSafeMode(safeMode).build());
    }
190218
private String read(final BufferedReader reader) throws IOException {
		StringBuilder sqlBuilder = new StringBuilder();
		try {
			for (String line : reader.lines().toArray(String[]::new)) {
				sqlBuilder.append(line).append(System.lineSeparator());
			}
		} finally {
			if (reader != null) {
				reader.close();
			}
		}

		return sqlBuilder.toString();
	}
1284786
public static String read(Reader reader) throws IORuntimeException {
		final StringBuilder builder = StrUtil.builder();
		final CharBuffer buffer = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);
		try {
			while (-1 != reader.read(buffer)) {
				builder.append(buffer.flip().toString());
			}
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
		return builder.toString();
	}
1353098
public String[] readTarget(Reader reader) throws IOException {
        Collection<String> targetColl = read(reader).values();
        Set<String> targets = new HashSet<>();
        for (String target : targetColl) {
            targets.add(target);
        }
        return targets.toArray(new String[targets.size()]);
    }
1023133
public static List<Certificate> loadCertificates(final Reader reader) throws IOException,
            CertificateException {
        try (PEMParser pemParser = new PEMParser(reader)) {
            List<Certificate> certificates = new ArrayList<>();

            JcaX509CertificateConverter certificateConverter = new JcaX509CertificateConverter()
                    .setProvider(BouncyCastleProvider.PROVIDER_NAME);
            Object certObj = pemParser.readObject();

            if (certObj instanceof X509CertificateHolder) {
                X509CertificateHolder certificateHolder = (X509CertificateHolder) certObj;
                certificates.add(certificateConverter.getCertificate(certificateHolder));
            }

            return certificates;
        }
    }
613373
public JsonReader createReader(Reader reader) {
        return new JsonReader(reader, jsonObjectFactory, jsonArrayFactory, objectMapper, typeAdapters);
    }
116919
public<T> Param<List<T>> asAny (ParamReader<List<T>> reader, String name) {
        return getParam(reader, name);
    }
603230
public Reader getReader() throws IOException {
        if (stream != null) {
            Reader reader = new InputStreamReader(stream, configuration.getSourceEncoding());
            stream = null;
            return reader;
        }
        return null;
    }
621326
public HalResource read(final Reader reader)
    {
        final ContentRepresentation readableRepresentation = representationFactory.readRepresentation(RepresentationFactory.HAL_JSON, reader);

        return new HalResource(objectMapper, readableRepresentation);
    }
1280488
public static String read(Reader reader) throws IOException {
        final char[] buffer = new char[1024];
        StringBuilder sb = new StringBuilder();
        int len;
        while ((len = reader.read(buffer)) != -1) {
            sb.append(buffer, 0, len);
        }
        return sb.toString();
    }
77104
public static ReadStreamOld openRead(Reader reader)
  {
    if (reader instanceof ReadStreamOld.StreamReader)
      return ((ReadStreamOld.StreamReader) reader).getStream();
    
    ReaderWriterStream s = new ReaderWriterStream(reader, null);
    ReadStreamOld is = new ReadStreamOld(s);
    try {
      is.setEncoding("utf-8");
    } catch (Exception e) {
    }

    return is;
  }
1249085
public <T> T read(final Reader reader, final DataTypeDescriptor<T> descriptor) {
		try {
			return jsonFormat.read(reader, descriptor);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
22491
public <T> T read(ReaderHandler<T> readerHandler) throws IORuntimeException {
		BufferedReader reader = null;
		T result = null;
		try {
			reader = FileUtil.getReader(this.file, charset);
			result = readerHandler.handle(reader);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		} finally {
			IoUtil.close(reader);
		}
		return result;
	}