History log of /libcore/luni/src/main/java/java/io/InputStream.java
Revision Date Author Comments
e7dc52f0cbb61a61b9908a9b1e7b58a34e12a06c 12-Sep-2013 Kenny Root <kroot@google.com> Make documentation on InputStream#skip more clear

On first reading the documentation for InputStream#skip seemed to imply
that 0 was only returned when n was 0. Reworded this to make it clearer
to the reader that sentence only applies when n is less than 0.

Change-Id: I5b3d70f87551cc54d80da7d978c2187a78bc39c1
325ff8c68ed5e530e9e1d487b9e2e6d8f8e2bd37 25-Jun-2013 Elliott Hughes <enh@google.com> Clean up the #read javadoc.

By being more consistent in parameter naming, we can inherit more javadoc.

Also fix a couple of javadoc warnings in KnownFailure and DataInputStream.

Change-Id: I778f40469404fb50c51cdb1068970974f923180c
ed79eabe3c220b66c07743ba6495c342a4b3eaf7 14-Sep-2011 Jesse Wilson <jessewilson@google.com> Give InputStream/OutputStream decent documentation.

The previous docs made it much too easy to miss the critical 'requirement'
that read(byte[],int,int) should be overridden.
http://code.google.com/p/android/issues/detail?id=7933#c36

Change-Id: I2c4e0e18026a93b8e994d4448be35114bd5f20bc
eb8027492e81d5d3a0d1cd49494c59f9a03eeaa3 07-Mar-2011 Elliott Hughes <enh@google.com> Remove useless overrides of InputStream.read(byte[]) and OutputStream.write(byte[]).

For the particular stream in the bug, the useless override assumes that the
implementation of read(byte[], int, int) or write(byte[], int, int) doesn't
do anything special. A dangerous and non-local assumption. (In the bug, we
need to change the three-argument write.)

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I915d4a2e20c98f8e7f5775b555ae77d496a535d0
6186821cb13f4ac7ff50950c813394367e021eae 08-Feb-2011 Jesse Wilson <jessewilson@google.com> Move libcore.base classes to libcore.util and libcore.io.

Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
fb0ec0e650bf8be35acb0d47da0311a7c446aa33 14-Jan-2011 Elliott Hughes <enh@google.com> Remove useless android-changed comments.

I've changed useful ones to regular comments or TODOs, as appropriate.

I've left ones in code like java.util.concurrent where we really are
tracking an upstream source, making the change markers useful.

I've left a handful of others where I intend to actually investigate
the implied TODOs before deciding how to resolve them.

Change-Id: Iaf71059b818596351cf8ee5a3cf3c85586051fa6
f9480f317cddcec859025833b748f096247a40aa 08-Dec-2010 Elliott Hughes <enh@google.com> Fix InflaterInputStream and ZipInputStream's skip methods' behavior with negative counts.

This fixes a couple of harmony tests. I've also cleaned up all the names to be
of the form <x>Count. I haven't made much of an effort to improve the
documentation because these methods aren't all identical and I don't have a
good tool for doing large-scale javadoc consolidation.

Change-Id: Ia11f78cbe7c17959d50709af03042aa7541733a0
b9cc455ed89df1a0cf4186c92b352c9649995d96 04-Dec-2010 Elliott Hughes <enh@google.com> Use our canonical Arrays range-checking methods.

There are a handful of manual range-checkers left, thanks to specified
API that throws IllegalArgumentException instead, and a few other weird
cases.

Change-Id: I80914c2257288fc184100545aff4fd6f57bf32c9
3541c79d5058b86e742867b4ee5811a1de01de1f 30-Sep-2010 Jesse Wilson <jessewilson@google.com> Don't use the decompression-buffer as the skip buffer in InflaterInputStream.

This has bad consequences for the GzipInputStream subclass, which can't
use the input buffer as a scratch space because it needs to CRC all of
the decompressed data.

Change-Id: I310261dc8ef7a5082768cc6d6a2eff4ef77f5a21
http://b/3042574
08a723cb3291b96a323478bd7d799192818cb0b1 15-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix problems discovered by Channels/Basic test.

In particular:
- available() wasn't trying very hard for FileChannels
where a reasonable value can be had.
- short writes weren't handled, so bytes were being lost
- the alternative InputStreamReader and OutputStreamReader
classes were incorrect and redundant
- the duplicated ChannelInputStream classes were redundant
and one was missing a required IllegalBlockingModeException
- bounds checks were redundant and handled by Bytebuffer.wrap
- null checks were missing.

The new code doesn't honor the user's supplied minBufferCapacity
and instead always uses 8K. 8K is larger than the 'min' so it
should be fine for undersized buffers. And it's sufficient for
high performance, so it should be fine for oversized buffers.
It'll only be a problem for clients that create a very large
number of these Readers, which shouldn't happen in practice.

http://b/issue?id=2233508

Change-Id: I3688397baae4f69f9146aed6a3a60d8333e5df1d
b1396870f92135aa140bd2b86221768dea5bc11d 25-May-2010 Elliott Hughes <enh@google.com> Remove the luni localized exception messages.

Also fix a bug I introduced in KXmlSerializer: s.isEmpty() is not
equivalent to "".equals(s) if s is allowed to be null.

Bug: 1251121
Change-Id: I41a0a98ffb49f214041c9110f824d327af5c34e8
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
fd6bb3510c2f94d636f3572dcf5f7f4dcd1a2726 13-May-2010 Elliott Hughes <enh@google.com> Remove //$NON-NLS-\d$ cruft.

Mostly done by perl(1), with manual cleanup of the few misspelled instances.
This makes our trailing whitespace slightly worse, but I'll fix all that with
a follow-on change.

Change-Id: I0b4ca98819be6f9519c4ba980d759bd1ee1a0303
582d926fbf5f5fd4800def67f86ecfedee44681e 05-Apr-2010 Elliott Hughes <enh@google.com> Froyo InputStream.available documentation improvement.

This method causes a lot of confusion, and we can do a lot better. (Ideally,
the API would either not exist or be something like "public boolean ready()".)

I've removed poor-quality documentation overrides too, so the full
documentation is visible in most places. (InflaterInputStream is an obvious
exception.)

Also, to a lesser extent, improve the InputStream.skip documentation.

Change-Id: I6d6cd788e6a32ad4a2613d1e381610f1ad8575fe
4fefecee9d4a5d2a4510f516b4015607b19e8d09 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
5839b909d9528b7726e678a4b696ed37df15d897 10-Oct-2009 Jesse Wilson <jessewilson@google.com> Udating luni to Harmony r823222.

Highlights:
- InputStream.skip concurrency issue
- "better" messages in bound exceptions for streams and arrays
- prefer fewer writes to underlying streams (using byte[] buffers)
- Rename subclasses to not reuse names from their superclasses
- PlatformAddressFactory.allocMap bugfix

Plus some spelling fixes, style fixes, serial version UIDs and other
boilerplate improvements.
f5597e626ecf7949d249dea08c1a2964d890ec11 25-Jul-2009 Jesse Wilson <jessewilson@google.com> Integrate luni module (but not tests) to Harmony r772995.

Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
a0881d052ee72e3f7e773374e9b1aa75fbd6be4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution