InputStreamEntity extends AbstractHttpEntity { @Override public final long getContentLength() { return this.length; } InputStreamEntity(
            final InputStream inStream, final long length, final ContentType contentType, final String contentEncoding);  InputStreamEntity(final InputStream inStream, final long length, final ContentType contentType);  InputStreamEntity(final InputStream inStream, final ContentType contentType); @Override final boolean isRepeatable(); @Override final long getContentLength(); @Override final InputStream getContent(); @Override final void writeTo(final OutputStream outStream); @Override final boolean isStreaming(); @Override final void close();  }
@Test public void testUnknownLengthConstructor() throws Exception { final InputStreamEntity entity = new InputStreamEntity(EmptyInputStream.INSTANCE, null); Assert.assertEquals(-1, entity.getContentLength()); }