/** * Optimal/Optional mergeDelimitedFrom - If the message does not fit the buffer, no merge is done and this method * will return false. * <p> * This is strictly for reading a single message from the stream because the buffer is aggressively filled when * reading the delimited size (which could result into reading more bytes than it has to). * <p> * The remaining bytes will be drained (consumed and discared) when the message is too large. */ public static <T> boolean optMergeDelimitedFrom(InputStream in, T message, Schema<T> schema, LinkedBuffer buffer) throws IOException { return optMergeDelimitedFrom(in, message, schema, true, buffer); }
@Override protected <T> boolean optMergeDelimitedFrom(InputStream in, T message, Schema<T> schema, LinkedBuffer buffer) throws IOException { return GraphIOUtil.optMergeDelimitedFrom(in, message, schema, buffer); }