@Test public void available_atStartOfStream() throws Exception { FixedLengthInputStream fixedLengthInputStream = new FixedLengthInputStream(inputStream("Hello World"), 5); int available = fixedLengthInputStream.available(); assertEquals(5, available); }
@Override public int available() throws IOException { return mLength - mCount; }
FixedLengthInputStream extends InputStream { @Override public int available() throws IOException { return mLength - mCount; } }
FixedLengthInputStream extends InputStream { @Override public int available() throws IOException { return mLength - mCount; } FixedLengthInputStream(InputStream in, int length); }
FixedLengthInputStream extends InputStream { @Override public int available() throws IOException { return mLength - mCount; } FixedLengthInputStream(InputStream in, int length); @Override int available(); @Override int read(); @Override int read(byte[] b, int offset, int length); @Override int read(byte[] b); @Override long skip(long n); @Override String toString(); void skipRemaining(); }
FixedLengthInputStream extends InputStream { @Override public int available() throws IOException { return mLength - mCount; } FixedLengthInputStream(InputStream in, int length); @Override int available(); @Override int read(); @Override int read(byte[] b, int offset, int length); @Override int read(byte[] b); @Override long skip(long n); @Override String toString(); void skipRemaining();  }