/*
 * Copyright 2014, Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *    * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *
 *    * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.grpc;

/**
 * Tagging interface for objects who's precise serialized length is known before serialization
 * starts. In the case of {@link java.io.InputStream} calls to
 * {@link java.io.InputStream#available()} will return an accurate length. Common stream
 * implementations which conform to this contract while not implementing this interface will
 * also be recognized by the transport, e.g. {@link java.io.ByteArrayInputStream}.
 */
public interface KnownLength {
}

@@ -1576,169 +1576,252 @@
 c;%0A%0A
-/**%0A * Tagging interface for objects who's precise serialized length is known before serialization%0A * starts. In the case of %7B@link java.io.InputStream%7D calls to
+import java.io.IOException;%0A%0A/**%0A * An %7B@link java.io.InputStream%7D or alike whose total number of bytes that can be read is known%0A * upfront.%0A *%0A * %3Cp%3EUsually it's a %7B@link java.io.InputStream%7D that also implements this interface, in which case
 %0A * 
@@ -1864,19 +1864,44 @@
 ()%7D 
-will
+has a stronger semantic by
  return
+ing
  an 
@@ -1913,239 +1913,259 @@
 ate 
-length. Common stream%0A * implementations which conform to this contract while not implementing this interface will%0A * also be recognized by the transport, e.g. %7B@link java.io.ByteArrayInputStream%7D
+number%0A * instead of an estimation.%0A */%0Apublic interface KnownLength %7B%0A  /**%0A   * Returns the total number of bytes that can be read (or skipped over) from this object until all%0A   * bytes have been read out
 .%0A
+  
  */%0A
-public interface KnownLength %7B
+  int available() throws IOException;
 %0A%7D%0A

Add available() to KnownLength