code: public static Vector parseListFrom(InputStream in, Schema schema) throws IOException
      {
          final Vector list = new Vector();
          byte[] buf = null;
          int biggestLen = 0;
          LimitedInputStream lin = null;
          for(int size=in.read(); size!=-1; size=in.read())
          {
              final Object message = schema.newMessage();
              list.addElement(message);
              final int len = size < 0x80 ? size : CodedInput.readRawVarint32(in, size);
              if(len != 0)
              {
                  // not an empty message
                  if(len > CodedInput.DEFAULT_BUFFER_SIZE)
                  {
                      // message too big
                      if(lin == null)
                          lin = new LimitedInputStream(in);
                      final CodedInput input = new CodedInput(lin.limit(len), false);
                      schema.mergeFrom(input, message);
                      input.checkLastTagWas(0);
                      continue;
                  }
                  
                  if(biggestLen < len)
                  {
                      // cannot reuse buffer, allocate a bigger buffer
                      // discard the last one for gc
                      buf = new byte[len];
                      biggestLen = len;
                  }
                  IOUtil.fillBufferFrom(in, buf, 0, len);
                  final ByteArrayInput input = new ByteArrayInput(buf, 0, len, false);
                  try
                  {
                      schema.mergeFrom(input, message);
                  }
                  catch(ArrayIndexOutOfBoundsException e)
                  {
                      throw ProtobufException.truncatedMessage(e);
                  }
                  input.checkLastTagWas(0);
              }
          }
          return list;
      }
docs: Parses the {@code messages} (delimited) from the {@link InputStream}
  using the given {@code schema}.
  
  @return the list containing the messages.