Parses the atom data without creating the event itself from data &amp;
meta data.

@param in
Input stream to read.

@return Entry.
15395
public final AtomEntry<JsonObject> readAtomEntry(final InputStream in) {

        try (final JsonReader jsonReader = Json.createReader(new InputStreamReader(in))) {
            final JsonObject jsonObj = jsonReader.readObject();
            try {
            
                final String eventStreamId = ((JsonString) JsonPath.read(jsonObj, "$.content.eventStreamId")).getString();
                final int eventNumber = ((JsonNumber) JsonPath.read(jsonObj, "$.content.eventNumber")).intValue();
                final String eventType = ((JsonString) JsonPath.read(jsonObj, "$.content.eventType")).getString();
                final String eventId = ((JsonString) JsonPath.read(jsonObj, "$.content.eventId")).getString();
        
                final JsonObject escMetaObj = JsonPath.read(jsonObj, "$.content.metadata");
        
                final String dataContentTypeStr = escMetaObj.getString("data-content-type");
                final EnhancedMimeType dataContentType = EnhancedMimeType.create(dataContentTypeStr);
                final JsonObject data = JsonPath.read(jsonObj, "$.content.data");
        
                final EnhancedMimeType metaContentType;
                final String metaTypeStr;
                final JsonObject meta;
                if (escMetaObj.containsKey("meta-type")) {
                    metaTypeStr = escMetaObj.getString("meta-type");
                    final String metaContentTypeStr = escMetaObj.getString("meta-content-type");
                    metaContentType = EnhancedMimeType.create(metaContentTypeStr);
                    meta = escMetaObj;
                } else {
                    metaTypeStr = null;
                    metaContentType = null;
                    meta = null;
                }
        
                return new AtomEntry<JsonObject>(eventStreamId, eventNumber, eventType, eventId, dataContentType,
                        metaContentType, metaTypeStr, data, meta);
    
            } catch (final RuntimeException ex) {
                LOG.error("Failed to parse JSON atom feed: " + jsonObj);
                throw ex;
            }
        }
        
    }
1087503
public static byte[] readAllToBytes(final InputStream in) throws IOException {
    try {
      final ByteArrayOutputStream result = new ByteArrayOutputStream();
      final byte[] buffer = new byte[1024];
      int length;
      while ((length = in.read(buffer)) != -1) {
        result.write(buffer, 0, length);
      }
      return result.toByteArray();
    } finally {
      in.close();
    }
  }
814427
public void parse(InputStream in) throws IOException, ParseException {
		String input = new String(StreamSupport.absorbInputStream(in));
		parse(input);
	}
477578
private IAtomContainer readMolecule() throws Exception {
        boolean foundCompound = false;
        while (parser.next() != XMLEvent.END_DOCUMENT) {
            if (parser.getEventType() == XMLEvent.START_ELEMENT) {
                if (parser.getLocalName().equals("PC-Compound")) {
                    foundCompound = true;
                    break;
                }
            }
        }
        if (foundCompound) {
            return parserHelper.parseMolecule(parser, builder);
        }
        return null;
    }
1027411
public Object parse(String in) throws ParseException {
		return parse(in, JSONValue.defaultReader.DEFAULT);
	}
400845
public final static int readMdLinkId(final StringBuilder out, final String in, final int start)
    {
        int pos = start;
        int counter = 1;
        while (pos < in.length())
        {
            final char ch = in.charAt(pos);
            boolean endReached = false;
            switch (ch)
            {
            case '\n':
                out.append(' ');
                break;
            case '[':
                counter++;
                out.append(ch);
                break;
            case ']':
                counter--;
                if (counter == 0)
                {
                    endReached = true;
                }
                else
                {
                    out.append(ch);
                }
                break;
            default:
                out.append(ch);
                break;
            }
            if (endReached)
            {
                break;
            }
            pos++;
        }

        return (pos == in.length()) ? -1 : pos;
    }
1259467
public Formula parse(final String in) throws ParserException {
    if (in == null || in.isEmpty()) {
      return this.f.verum();
    }
    try {
      final CharStream input = CharStreams.fromString(in);
      this.lexer.setInputStream(input);
      final CommonTokenStream tokens = new CommonTokenStream(this.lexer);
      this.parser.setInputStream(tokens);
      return this.parser.getParsedFormula();
    } catch (final ParseCancellationException e) {
      throw new ParserException("Parse cancellation exception when parsing the formula", e);
    } catch (final LexerException e) {
      throw new ParserException("Lexer exception when parsing the formula.", e);
    }
  }
690853
private static String getString(InputStream in) {
        try {
            StringBuffer out = new StringBuffer();
            BufferedReader reader =
                    new BufferedReader(new InputStreamReader(in));
            String line = reader.readLine();
            while (line != null) {
                out.append(line + "\n");
                line = reader.readLine();
            }
            return out.toString();
        } catch (Exception e) {
            return "[Error reading response body: " + e.getClass().getName()
                    + ": " + e.getMessage() + "]";
        }
    }
376170
public <T> T parse(String in, Class<T> mapTo) throws ParseException {
		return getPString().parse(in, JSONValue.defaultReader.getMapper(mapTo));
	}
1052727
public<IN,S> void load(IN in, Parse<IN, S> parser) throws IOException, ParseException {
		extract(in,(Writer)null, parser);
	}
1363863
private static byte[] readStream(final InputStream in) throws IOException {
    final ByteArrayOutputStream bos = new ByteArrayOutputStream();
    final byte[] data = new byte[4096];
    int bytesRead;
    while ((bytesRead = in.read(data, 0, data.length)) != -1) {
      bos.write(data, 0, bytesRead);
    }
    return bos.toByteArray();
  }
1043766
public static XElement parseXML(InputStream in) throws XMLStreamException {
        XMLInputFactory inf = XMLInputFactory.newInstance();
        XMLStreamReader ir = inf.createXMLStreamReader(in);
        return parseXML(ir);
    }
785484
public static String readString(final DataInput in) throws IOException {

		if (in.readBoolean()) {
			final int length = in.readInt();
			if (length < 0) {
				throw new IOException("length of StringRecord is " + length);
			}

			final byte[] bytes = new byte[length];
			in.readFully(bytes, 0, length);
			return decode(bytes);
		}

		return null;
	}
787921
public static String readString(DataInput in) throws IOException {
        int length = WritableUtils.readVInt(in);
        byte[] bytes = new byte[length];
        in.readFully(bytes, 0, length);
        return decode(bytes);
    }
480716
public GenericDictionaryEntry parse(String entry) {
        String[] fields = parseLine(entry);

        String surface = fields[0];
        short leftId = Short.parseShort(fields[1]);
        short rightId = Short.parseShort(fields[2]);
        short wordCost = Short.parseShort(fields[3]);

        List<String> pos = new ArrayList<>();
        pos.addAll(Arrays.asList(fields).subList(4, 10));

        List<String> features = new ArrayList<>();
        features.addAll(Arrays.asList(fields).subList(10, fields.length));

        GenericDictionaryEntry dictionaryEntry = new GenericDictionaryEntry.Builder().surface(surface).leftId(leftId)
                        .rightId(rightId).wordCost(wordCost).pos(pos).features(features).build();

        return dictionaryEntry;
    }
934972
public static <T> T parse(byte[] in, Class<T> mapTo) {
		try {
			JSONParser p = new JSONParser(DEFAULT_PERMISSIVE_MODE);
			return p.parse(in, defaultReader.getMapper(mapTo));
		} catch (Exception e) {
			return null;
		}
	}
406768
@Override
	public ImmutableList<TargetAtom> parse(String input) throws TargetQueryParserException {
		StringBuffer bf = new StringBuffer(input.trim());
		if (!bf.substring(bf.length() - 2, bf.length()).equals(" .")) {
			bf.insert(bf.length() - 1, ' ');
		}
		if (!prefixes.isEmpty()) {
			// Update the input by appending the directives
			appendDirectives(bf);
		}		
		try {
			CharStream inputStream = CharStreams.fromString(bf.toString());
			TurtleOBDALexer lexer = new TurtleOBDALexer(inputStream);

			//substitute the standard ConsoleErrorListener (simply print out the error) with ThrowingErrorListener
            lexer.removeErrorListeners();
			lexer.addErrorListener(ThrowingErrorListener.INSTANCE);

			CommonTokenStream tokenStream = new CommonTokenStream(lexer);
			TurtleOBDAParser parser = new TurtleOBDAParser(tokenStream);
            //substitute the standard ConsoleErrorListener (simply print out the error) with ThrowingErrorListener
			parser.removeErrorListeners();
			parser.addErrorListener(ThrowingErrorListener.INSTANCE);

			return (ImmutableList<TargetAtom>)visitor.visitParse(parser.parse());
		} catch (RuntimeException e) {
			throw new TargetQueryParserException(e.getMessage(), e);
		}
	}