• Home
  • History
  • Annotate
  • only in /libcore/luni/src/main/java/java/net/
History log of /libcore/luni/src/main/java/java/net/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
15fe2bbb382a47b298c1191e9aa6a177b4dcfb8a 02-Jun-2015 Neil Fuller <nfuller@google.com> Improve HttpURLConnection Performance docs

Bug: 21582657
Bug: https://code.google.com/p/android/issues/detail?id=174949
(cherry-picked from commit b33ae4f5857e7b9ed870336655d2b42673c69146)

Change-Id: Ide0cb3ae300dbad5ae371ae7ac4fcae363ca0eba
ttpURLConnection.java
72ed50d1e9048b79efdb5b9e4ffb07c99a302d84 16-Jan-2015 Lorenzo Colitti <lorenzo@google.com> Use the IPv6 instead of the IPv4 wildcard address in sockets.

A few places in libcore consider the local address of an unbound
socket to be Inet4Address.ANY. For example, calling
getLocalAddress on an uncreated Socket will return 0.0.0.0, and
when creating a DatagramSocket, libcore attempts to bind it to
0.0.0.0 unless the caller specifies another address.

On Android, this is incorrect. All native socket filedescriptors
that underpin Java socket objects are created by IoBridge.socket,
and are dual-stack AF_INET6 sockets, not AF_INET sockets. When
such a socket is created, its local address is ::, not 0.0.0.0.
Thus, for example, calling getLocalAddress on a just-created
ServerSocket object will return ::. Binding to 0.0.0.0 is not
even allowed by os.bind, which silently converts it to :: instead
(in inetAddresstoSockaddr).

Therefore, accept reality and use :: instead of 0.0.0.0 in the
Java layer as well. Specifically:

1. Change DatagramSocket's constructors to bind to :: instead of
0.0.0.0. This is a complete no-op, because os.bind() silently
converts 0.0.0.0 into ::. Add a test for the other of the two
codepaths.
2. Change InetSocketAddress so that an uninitialized object has
an IP address of :: and not 0.0.0.0, and update its test. This
is unlikely to break anything short of an app that explicitly
depends on this behaviour, because os.bind() converts 0.0.0.0
to ::, and because any SocketAddress returned by any real
socket will never contain 0.0.0.0 anyway.
3. Change Socket so that calling getLocalAddress() when there is
no underlying socket file descriptor is will return :: instead
of 0.0.0.0. This is more correct, because it's consistent with
sockets that have been created, which will never have a local
address of 0.0.0.0.

Tested: vogar $(find libcore/*Socket*Test*) all passes on device.

Bug: 18094870
Change-Id: I9d60710fe945a99d6a5e65430248a889008ef4b1
atagramSocket.java
netSocketAddress.java
erverSocket.java
ocket.java
7d5a8340b6f50d1d8677463897c3ba499fad3eb8 20-Jan-2015 Neil Fuller <nfuller@google.com> Make socket binding behavior clearer

Use of "localhost" to mean "the local host" and not "loopback" was
confusing.

Some docs lacked information.

InetSocketAddress was ambiguous around what was being described. Use
of "this socket" rather than "the socket [endpoint|address|]" makes
it sound like InetSocketAddress is a socket, not a socket's address.

Bug: 19065543
Change-Id: Ic7265464ba39ecace6640b8c4f7a9084ea6ae1d2
atagramSocket.java
atagramSocketImpl.java
netSocketAddress.java
erverSocket.java
ocket.java
a43c5da446e8f02ebe23b6a026c25f4e25d89318 14-Jan-2015 Neil Fuller <nfuller@google.com> Fix the hostname for the IPv6 loopback address

Previously the hostname was "localhost", which
resolves to the IPv4 loopback address.

Also fixed the documentation for getAllByName(null)
which has returned the loopback addresses all the way
back to 2009 and not thrown an exception as
suggested in the docs.

Test fixes and new tests included.

Depends on commit 25147416bb105914c3cdf8fd65ca7cc20dae0f3e

Bug: 18991397
Bug: https://code.google.com/p/android/issues/detail?id=96801
Change-Id: I9723516a977e2a3b97412bc1d7e58b36df327feb
net6Address.java
netAddress.java
bfb6633525beaccab203baebc5861acbe3088f4d 07-Jan-2015 Elliott Hughes <enh@google.com> Fix a javadoc typo in java.net.URL.equals.

Bug: https://code.google.com/p/android/issues/detail?id=92930
Change-Id: Id3bc22d16cf4f493e937ebc76ebacd6a01b6f454
RL.java
7c3ed526ed9a4a508c3ae6d6e104f51dd9d7a1c1 15-Dec-2014 Neil Fuller <nfuller@google.com> Merge "When connecting to a SOCKS proxy, use the resolved IP"
b3a4dd8402e39a4d1209515adaf01f6b288fcea9 08-Dec-2014 Neil Fuller <nfuller@google.com> When connecting to a SOCKS proxy, use the resolved IP

Noticed while inspecting the code. In HttpURLConnection a similar
change was made recently (commit
797fdc6cc6bf16372e9464f189b535148f944ce9).

Previously if the Proxy was specified with a resolved
InetSocketAddress (i.e. one with a specific IP address already
determined) the hostname would still be used to work out an IP
address to connect to. For host names with multiple IPs the host
connected to could be a different one than the one specified.

Now if the InetAddress has been resolved it will be used. In the
case where the InetAddress is bad this may delay DNS / resolution
errors to later in the connection process. It will, however, avoid
the "connect to a different host" issue, and avoid a reverse DNS
lookup here when the host is not yet known.

Change-Id: I46df5c38942f2d356ba2fd4541e0269021fd6496
lainSocketImpl.java
ee458cf73d150be182b1797bc59043b131706f7f 03-Dec-2014 Neil Fuller <nfuller@google.com> Fix InetSocketAddress.getHostString(): return the name if available

getHostString() would return the IP address in one of the three
scenarios possible:

1) InetSocketAddress created with a name - already worked, name returned.
2) InetSocketAddress create with an InetAddress with only an address - already worked,
address returned.
3) InetSocketAddress create with an InetAddress with an address and name: would return
the address.

Change-Id: Id9d1addda5cef589ac56db5397e00e842cf8c5d7
netAddress.java
netSocketAddress.java
f9e4afffa4c4067fd8ac6d647acdb70415af4d55 29-Oct-2014 Narayan Kamath <narayan@google.com> am bb23450e: Merge "Allow "_" in URIs."

* commit 'bb23450e9101061e636afb15aaebcfa5ed9724c1':
Allow "_" in URIs.
435edc3fa9abd3f8d324c9dd4279a165051052ba 27-Oct-2014 Narayan Kamath <narayan@google.com> Allow "_" in URIs.

Note that this is contrary to RFC-2396, which only allows alphanumeric
characters and hyphens. We need this change because internet hosts out
there clearly don't care enough about standards.

bug: 18023709

Change-Id: I9459f58d49ccc68af887a14c889eaa60b6c3150d
RI.java
d45744281bc05a21aec647fbd2cccdaedf9e1ff1 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

(cherry-pick of f39b5ca3c6378c3c36c63889577004b9693ea9c6.)

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
RLConnection.java
0aff1dd0b4be1b8d8cb45b59079ca883a1b3205a 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

(cherry-pick of 63744c884dd4b4f4307f2b021fb894af164972af.)

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
ttpCookie.java
ocketOption.java
tandardSocketOptions.java
4aadbe01b75956c4a1c5af56723e5e6e3da25c47 17-Jun-2014 Anwar Ghuloum <anwarg@google.com> Merge "Remove more." into lmp-preview-dev
63744c884dd4b4f4307f2b021fb894af164972af 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
ttpCookie.java
ocketOption.java
tandardSocketOptions.java
f39b5ca3c6378c3c36c63889577004b9693ea9c6 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
RLConnection.java
e8a958066d95a4e15a9834e8b9067d106efd9b53 15-Jun-2014 Elliott Hughes <enh@google.com> @hide.

Change-Id: Ieacf34a7b850910e70ae54f738608509e2c39e2e
ttpCookie.java
ocketOption.java
tandardSocketOptions.java
RLConnection.java
7e3af357a564428de9d4708d0dff034fd17bf317 15-May-2014 Neil Fuller <nfuller@google.com> am 012aab92: am 0b1640c6: am ab49c858: Merge "Fix decoding of jar: URLs"

* commit '012aab927d9210a42d513fe38d2934dc66d5422d':
Fix decoding of jar: URLs
37b050b2a191930e06cb35667e6fd96af9c78141 14-May-2014 Neil Fuller <nfuller@google.com> Fix decoding of jar: URLs

Previously the URL was not decoded. Therefore:

new URL("jar:file:///my%20dir/file.jar!/").openConnection()

would have expected to find a jar file "/my%20dir/file.jar"
and not "/my dir/file.jar".

libcore.net.url.FileURLConnection does work properly and does
the same kind of decoding included here.

This fixes:
org.apache.harmony.tests.java.net.JarURLConnectionTest.test_getURLEncodedEntry

Bug: 14811628
Change-Id: Ie1622bd3e9064c210f503bd54219b89e36aadc0e
arURLConnection.java
3e58734d651080009c9190c7062837fca5c7cf4e 13-May-2014 Paul Jensen <pauljensen@google.com> Add support for network-specific host name resolution.

For now all such support is hidden.

Change-Id: I932f73158a8f6e3ccc36c319d138180dff2aa070
ddressCache.java
netAddress.java
e9ed1b1450852172a48f9811ebb09d25f2f7e140 08-May-2014 Neil Fuller <nfuller@google.com> Unhide further 1.7-era APIs

Change-Id: I15ef2991b03a9503d6917a7f3351b32f42f662fb
ttpCookie.java
7406d4e17dd39f3531e764ec7788b1f8dec99971 25-Apr-2014 Elliott Hughes <enh@google.com> am 3eb545e3: am 85fa4285: Merge "Groundwork towards making the Libcore.os functionality public."

* commit '3eb545e382a12565ed8779632015d736d6f5c32c':
Groundwork towards making the Libcore.os functionality public.
5d930cadc8f62aee5f18e7921296fe66a54f18ab 24-Apr-2014 Elliott Hughes <enh@google.com> Groundwork towards making the Libcore.os functionality public.

Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
atagramSocket.java
net4Address.java
net6Address.java
netAddress.java
netUnixAddress.java
etworkInterface.java
lainDatagramSocketImpl.java
lainSocketImpl.java
a12a32a2cfb04b6e6c9679686fd6f4df49458366 23-Apr-2014 Neil Fuller <nfuller@google.com> am 38f2ba65: am 4d402932: Merge "libcore changes to support asynchronous close interruption"

* commit '38f2ba6505b1d500cbdcbeff4038ebcf2502c957':
libcore changes to support asynchronous close interruption
f0d40d662d9dfdb04215c718961765837d2cf00c 11-Apr-2014 Neil Fuller <nfuller@google.com> libcore changes to support asynchronous close interruption

Previously AsynchronousSocketCloseMonitor was used to handle
socket interruption on close. To support the same for
FileChannel it has been renamed to AsynchronousCloseMonitor.
The Java class was already called this.

FileInputStream, FileOutputStream, RandomAccessFile will
now throw IOException if a connection is closed by another
thread during read. Thread.interrupt() continues to have no effect
on streams.

FileChannel will now throw AsynchronousCloseException during
reads and writes if the file is closed, per the documentation.

FileChannel will now throw ClosedByInterruptException during
reads and writes if the thread reading/writing is interrupted.

Note: FileChannel.lock() will probably still not not throw
AsynchronousCloseException, though it probably should.

This change also has impact on external/conscrypt and
frameworks/base.

Change-Id: I37de3e7d1a005a73821221e6156d10b95c595d7a
Bug: 13927110
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
25e4ddbf41859b8e38fb8d826c9876bf25a54ee6 11-Apr-2014 Calin Juravle <calin@google.com> am 9ae2323e: am 71aab661: Merge "Don\'t allow explicit signs in URL port numbers."

* commit '9ae2323e27c7964cb2dc6ab50bbee1cd82c90fca':
Don't allow explicit signs in URL port numbers.
a41120bed93409304b18a45b058bec7111903549 11-Apr-2014 Calin Juravle <calin@google.com> am c766471e: am a4d97e18: Merge "Don\'t allow explicit signs in URI port numbers."

* commit 'c766471e47bbd346b14622f1112c6700b58c6009':
Don't allow explicit signs in URI port numbers.
bb3195ff5c5fa60456fe86927bee3aebcbe867aa 10-Apr-2014 Calin Juravle <calin@google.com> Don't allow explicit signs in URL port numbers.

Bug: 5239391
Change-Id: Iea158e19de2ace224f29c07c56811b7eab9c0eb9
RLStreamHandler.java
30fac583a89ef577ed74629c41c1bea1ffbee4e8 10-Apr-2014 Calin Juravle <calin@google.com> Don't allow explicit signs in URI port numbers.

Bug: 5239391
Change-Id: I26fb1042d169d545a793e47596f4f8a94dd09530
RI.java
bb99ef0166c208b2a40008062f35d767a5a20f19 07-Apr-2014 Neil Fuller <nfuller@google.com> am e05b49cc: am 23bdc757: Merge "Fix broken CTS HttpCookie test"

* commit 'e05b49cc2e55d4e23135a69f199b5fb09d94c4f5':
Fix broken CTS HttpCookie test
154d3fb470158aa01cae000781d0d65cf4c186dd 04-Apr-2014 Neil Fuller <nfuller@google.com> Fix broken CTS HttpCookie test

Added some test cases and corrected the test to conform
to the RI behavior.

Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760
Bug: 13748507
ttpCookie.java
de6139c4a84f320aa4ca9b5044fdbc4a2a9c5d26 12-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add APIs for better interoperability with Java 1.7"
883084f7eac26f1fdd79858c8bd2e68600011b0b 10-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add 1.7 methods to HttpCookie."
8621348d05b28d7626e76fcea3ea6f45099a9157 07-Mar-2014 Neil Fuller <nfuller@google.com> Add APIs for better interoperability with Java 1.7

Must be committed at the same time as the change in framework
to update the public API footprint.

See commit 38ce4c0f83d4ac35c4c63fecf7c8775f9b16f6da in framework/base.

Change-Id: I71a88b09feef8bc2b50b3aeafc3be5863eea3063
ocketOption.java
tandardSocketOptions.java
RLConnection.java
3bb69fa0b8fe5119c3f19cd7f5d725118aa506af 07-Mar-2014 Neil Fuller <nfuller@google.com> Add 1.7 methods to HttpCookie.

Adding isHttpOnly() and setHttpOnly(). Added more
documentation around the specifications supported since
the HttpOnly attribute was added by RFC 6265. Improved
documentation around toString() because I found the method
confusing, plus RFC 6265 goes back to a simpler format
than the RFC it obsoletes meaning callers should use
version 0 not version 1.

Change-Id: Ie52ea80dc5bd7d1575fcaccde70976ed29729817
ttpCookie.java
5a57ed5f213aad62255884b2eacb6aece630e9ed 03-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Implementation of MulticastChannel."
60f79119fd7e37c459a96888594f90d86bab5535 27-Feb-2014 Neil Fuller <nfuller@google.com> Tests and docs updates for OkHttp update.

OkHttp has made various changes. This fixes the known
breakages before the update is applied.

1) Chunk length is no longer honored exactly. The
API docs have been updated to reflect this.

2) testConnectViaHttpsWithSSLFallback simulated an SSL
handshake failure by closing the socket. This is no longer
sufficient to trigger the fallback behavior after OkHttp change
46a0852. testSslFallback tests an actual handshake failure and
provides coverage. testConnectViaHttpsWithSSLFallback
has therefore been removed.

3) testRetryableRequestBodyAfterBrokenConnection is similar to
testConnectViaHttpsWithSSLFallback. Previously it passed because
of the SSL fallback behavior. That fallback no longer happens.
It is possible this was actually supposed to be checking the
internal RetryableOutputStream. Now OkHttp does not retry
connections after the connection is made it is not possible
to test the request body is "replayed" to the server.

4) testNonRetryableRequestBodyAfterBrokenConnection: Related to
3 above. It was testing that fixed length request bodies are not
retryable. This test continues to pass with OkHttp but only
because it fails to retry generally, not because of the request
body and therefore the test is misleading.

Change-Id: If430bce75ad5b2fd5ace38d0f65d9c4af56b88df
ttpURLConnection.java
df29508a7aa622f265aaebdc472eb7d679185ebb 30-Jan-2014 Neil Fuller <nfuller@google.com> Implementation of MulticastChannel.

Note: ProtocolFamily / StandardProtocolFamily /
DatagramChannel.open(ProtocolFamily) have not been
implemented.

There is a related change to libnativehelper that
must be merged at the same time to avoid
build breakage. See
https://android-review.googlesource.com/#/c/81371/

Bug: 12464155
Change-Id: I07fc049b429a2d373e9bd7b07149632f5cd69f9d
ulticastSocket.java
2587ef91ba693d73e97704e8163c050b286e7330 14-Feb-2014 Neil Fuller <nfuller@google.com> Addition of 1.7 methods to URLConnection.

URLConnection.getHeaderLong() and
URLConnection.getContentLengthLong().
These methods are required by okhttp.

Changed JarURLConnectionImpl.getContentLength() to return -1
when the size of an entry cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Changed FileURLConnection.getContentLength() to return -1
when the size of the file cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Change-Id: Ib43e68a2536c2602b4c7ee0cda68fa1f90045f57
RLConnection.java
ff81b740a338ba964e0ba1c40d925fb2ceb37bf2 20-Jan-2014 Neil Fuller <nfuller@google.com> Adding additional methods to NetworkChannel.

Adding NetworkChannel.supportedOptions(), NetworkChannel.getOption(),
NetworkChannel.setOption(). A lot of the changes are in documentation
and tests.

Bug: 12464155
Change-Id: Ifa56843a8823b6b9cbd262409adc2450b401c654
ulticastSocket.java
ocketOption.java
ocketOptions.java
tandardSocketOptions.java
47ae0b5a1d96c8030e0963ccc5b44c3ee66aaec3 20-Jan-2014 Neil Fuller <nfuller@google.com> Implementing bind() and getLocalAddress() for NIO2.

This change introduces NetworkChannel, but only bind() and
getLocalAddress() methods. To avoid breaking existing Android
applications that extend ServerSocketChannel, DatagramChannel and
SocketChannel the methods have been added with concrete
implementations that throw exceptions rather than leaving them
abstract.

In channel tests, usages of channel.socket().bind() and
channel.socket().getLocalSocketAddress() have been changed to
channel.bind() and channel.getLocalAddress(), since the behavior is
close enough and the tests should be written against the channel APIs
as much as possible. Tests have been added for new methods.

Removed further overriding in
DatagramChannelImpl.DatagramSocketAdapter and
SocketChannelImpl.SocketAdapter which revealed some bugs and lack of
clarity in the docs for the socket methods:

Improved the documentation for DatagramSocket.getLocalAddress(),
DatagramSocket.getLocalSocketAddress(),
ServerSocket.getInetAddress(), ServerSocket.getLocalPort(),
ServerSocket.getLocalSocketAddress(), Socket.getLocalAddress(),
Socket.getLocalPort(), Socket.getLocalSocketAddress(). These methods
treat special cases differently.

Fixed a bug in DatagramSocket.getLocalSocketAddress() where it would
incorrect throw an exception if the socket has been closed, which
contradicts the (updated) documentation and the RI. It now returns
null. Added tests.

Fixed a bug in Socket.close(): a closed socket would still report as
being connected. Added tests.

Fixed a bug in Socket.startupSocket() - the socket was recording it
was being bound, but was not updating the cached local address. This
method is called during ServerSocketChannel.accept() and would cause
the socket to report its local address as being the wildcard address,
when it is not. Added a test.

Change-Id: Ibec8527e1c72597e268d23e6c1f03eb16e46cdc4
Bug: 12464155
atagramSocket.java
erverSocket.java
ocket.java
933fbbf606268eec9fc430632b8bca7002a833b3 14-Jan-2014 Neil Fuller <nfuller@google.com> Refactoring in preparation for NIO2 changes.

Making the various Socket/Channel classes more consistent with each
other for synchronizing state between the Channel, Socket and the OS.
This is in preparation for NetworkChannel.bind().
Synchronizing state revealed a test that relied upon a Socket from a
channel not reporting isConnected() properly after a connect(). Tests
have been updated.

Reading the local address back from the OS revealed that Android is
using IPv6 and reports the string equivalent of IPv4's 0.0.0.0 as
"::". Updated a test that was relying on the string form.

Calling connect() twice on a DatagramSocket appears inconsistent with
itself and Channel and other Sockets. A pure DatagramSocket switches
over to the new remote address. I have changed the Channel-backed
DatagramSocket to throw an IllegalStateException exception, and have
created a bug to discuss making the calls more consistent.

Socket has been modified to avoid using the address field to store
the local address after a bind(). This field is documented as holding
the remote address, not the local.

Changed implementation of SocketChannelImpl.socket().getInputStream()
and SocketChannelImpl.socket().getOutputStream() to use the one that
is implemented by Socket and not a custom NIO-based implementation.
The use of NIO provided two parallel implementations for the same
thing. This change alters behavior when attempting to read zero bytes
and when a Channel is in non-blocking mode: now it throws
IllegalBlockingModeException rather than
ArrayIndexOutOfBoundsException. The tests have been updated.

Various tidying up changes to introduce @Override, remove
unnecessarily initialized local variables, fields, semi-colons,
javadocs and imports. Added close() calls for objects during tests
that were cluttering the logs.

Modified IoBridge.connect() to be void. Adjusted SocketChannelImpl
accordingly and tidied up impossible cases. Modified
SocketChannel.connect() so that it always returns false in
non-blocking mode. This looks like an existing bug:
it would previously have returned true, even though the connection
was potentially still pending. Tests have been added.

Also tidied up SocketChannelImpl.finishConnect() - it was potentially
resetting the isBound state.

Change-Id: Ic7943615b4b763f77e74397e0e91a62edc7d7017
bug: 12464155
atagramSocket.java
atagramSocketImpl.java
lainDatagramSocketImpl.java
lainSocketImpl.java
erverSocket.java
ocket.java
ocketImpl.java
6be37f5f3d46daecf6c0d3e1078e25cca3ce4732 22-Nov-2013 The Android Open Source Project <initial-contribution@android.com> Merge commit '0a56e711dc7b1a310f57c58f5cb61add4808f713' into HEAD

Change-Id: I883352e71c7d5f057764bdb822836023e57b6ba9
0b217ad34f025aedbba468e248303bdc8b2e5df0 19-Nov-2013 Narayan Kamath <narayan@google.com> Improve URI.equals performance.

The main improvement is that we're vastly reducing
the amount of garbage this method creates.

Also, get rid of some incorrect checks and add a new
benchmark test case.

Before vs. After:

URI Equals 1540.1 =
URI EqualsWithHeavilyEscapedComponent 11921397.1 ==============================

URI Equals 1337.2 =
URI EqualsWithHeavilyEscapedComponent 588934.3 ==============================

Change-Id: I9ddb87b8267f0ac6a3ac85c2989cc0dd305ef6a1
RI.java
ab6d858336e6db8b5117b78837fee2a9f35fdf2c 29-Oct-2013 Narayan Kamath <narayan@google.com> Make getInetAddress generate less garbage.

This function is now on the critical path for URLConnection
since OkHttp calls it to figure out what the MTU for the
NetworkInterface is.

This function performs poorly when there are a large
number of interfaces available.

- Read /proc/net/if_inet6 exactly once, instead of
once per interface.
- List the contents of /sys/class/net exactly once,
and not once per interface.

Also adds a couple of tests for if_inet6 parsing.

TODO: Add a "zero copy" version of UnsafeByteSequence
and then move readIntFile over to that version.

bug: 11411129
Change-Id: Ieb1d5f0beaf462721f897a5f6376a4587f3aebaf
etworkInterface.java
413d4592ee114eac81014af4b6347e73873ce8ce 03-Sep-2013 Elliott Hughes <enh@google.com> Use the docs-approved Android x.y (Name) format consistently.

Also include the API level where the reason for mentioning the version
is an API difference (as opposed to simply a behavioral difference).

Change-Id: Idd69630fc5d6f6f0bd5d1c524cb32fd8c2fb750d
ttpURLConnection.java
1e1804d82a82200f77edbf704cad825fea80527b 08-Jul-2013 Elliott Hughes <enh@google.com> Merge "Permit content lengths greater than 2 GiB"
f649e9972264cbe48f0be90c25e5661c50963f82 06-Jul-2013 jwilson <jwilson@squareup.com> Permit content lengths greater than 2 GiB

Change-Id: Id14de316d1eff3443ff9c91f098fe7ae4b6561cd
ttpURLConnection.java
2a6f23ff8690ac2f025588a360547ce96cde0943 29-Jun-2013 Elliott Hughes <enh@google.com> Add java.nio.charsets.StandardCharsets.

Bug: 3484927
Change-Id: I5820267491b850b8fcc696fa48962710de123009
netUnixAddress.java
ocks4Message.java
RLClassLoader.java
RLEncoder.java
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
lainSocketImpl.java
99b4489d0555c6e0e5df941cbfad4cf250c8f0b8 07-Jun-2013 Elliott Hughes <enh@google.com> Fix @deprecated javadoc orthography.

Change-Id: I6db6d91e21b8e1aca5b5338534196fd5bdef8a06
atagramSocketImpl.java
ttpURLConnection.java
ulticastSocket.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
8ffa0b68c9fd3f722bee2bcd94b1d38151a0791d 13-May-2013 Elliott Hughes <enh@google.com> Un-@hide various APIs.

Bug: 3484927
Change-Id: I4cda326a31240135d883528d9cb976a9db084234
netAddress.java
netSocketAddress.java
etworkInterface.java
9902f3494c6d983879d8b9cfe6b1f771cfefe703 10-May-2013 Elliott Hughes <enh@google.com> Finish off AutoCloseable.

Bug: 3484927
Change-Id: Ia0f5ad3db9807459ce6cda05bc2f53564b63b375
atagramSocket.java
erverSocket.java
ocket.java
255a6f4ab321614ed1ca26849d1df7fa9c0610f5 25-Apr-2013 Elliott Hughes <enh@google.com> Fix getLocalAddress on closed sockets.

Bug: https://code.google.com/p/android/issues/detail?id=54072
Change-Id: Ie32708054f584885ec85dd7847c128d48ff6c7d5
atagramSocket.java
atagramSocketImpl.java
ocket.java
2503556d17b28c7b4e6e514540a77df1627857d0 30-Mar-2013 jwilson <jwilson@squareup.com> Switch to OkHttp as URL's preferred HTTP implementation.

Change-Id: Id724b75dd78b68ed00f5db4989c4070896996ec0
xtendedResponseCache.java
ttpURLConnection.java
esponseSource.java
RL.java
f4a4259d8a548ab172ca98b702feafcd0ceb1411 22-Mar-2013 Elliott Hughes <enh@google.com> Remove EWOULDBLOCK from libcore.

On Linux, EWOULDBLOCK == EAGAIN, and having a synonym is just confusing.

Change-Id: If53c4ba6d82eed2236dec12003c4c9512c4ecbee
lainSocketImpl.java
482a3fc5635ac431b8a7476d7fe3397af4c2e8ec 21-Mar-2013 Elliott Hughes <enh@google.com> Add support for Unix domain sockets.

Bug: 6513075
Change-Id: I0b0166f59745ac8175b39d7796c093041b2df4fd
netSocketAddress.java
netUnixAddress.java
51cf1b49bca54ec0229a51df400ad1bee580b1bb 16-Mar-2013 Brian Carlstrom <bdc@google.com> Assorted socket fixes related to test_SSLSocket_setSoWriteTimeout failure investigation

1.) Fixed the failure of libcore.javax.net.ssl.SSLSocketTest's
test_SSLSocket_setSoWriteTimeout by setting send/recv buffer sizes earlier (b/8272932)
2.) Fixed javadoc bug in java.net.Socket
3.) Fixed implementation bug in IoBridge affecting reading SO_RCVBUF
4.) Fixed bug where we would leave unsent bytes in OpenSSL write buffer after SSLSocket write
possible cause of b/6693087

Bug: 8272932
Bug: 6693087
Change-Id: I54e084e58e8b10583a6ac3051d5e05e519139d64
ocket.java
cff1616012dc0d56c2da9af2b9b1183e76c7e044 04-Dec-2012 Elliott Hughes <enh@google.com> Add detail messages to all the easy IllegalArgumentException cases.

Noticed during my recent Matcher change.

Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
atagramSocket.java
ttpCookie.java
ocket.java
RISyntaxException.java
be4a7d686edf15a7fbdd00b40cf78cb26d105d0e 16-Oct-2012 Elliott Hughes <enh@google.com> More "charsetName" consistency.

A follow-on to 9b9e9145bc55a47be42a9d3f7ecc9f6b533739b2, after URLDecoder
caused some confusion.

Change-Id: I727dc375593596272d06e177c5dd8002d3e7321c
RLDecoder.java
d43b9ef11a1095967a3396b246639b563e1a4128 12-Sep-2012 Kenny Root <kroot@google.com> Add consistent reasons for NullPointerException

Semi-automated replacement of empty and non-conforming
NullPointerException reason messages.

(cherry-pick of 86acc043d3334651ee26c65467d78d6cefedd397.)

Change-Id: I6d893979f5c20a50e841e32af9fd7b2d8bc9d54d
ookieStore.java
atagramSocket.java
RISyntaxException.java
RLClassLoader.java
699f565e8773f3aab263e7b33f6d089355814f19 06-Aug-2012 Elliott Hughes <enh@google.com> Improve the URLConnection timeout documentation slightly.

Change-Id: Ia4fbe6466f6db3f1186e6a007988d59140fc9f40
RLConnection.java
3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3 24-Jul-2012 Elliott Hughes <enh@google.com> Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

Bug: http://code.google.com/p/android/issues/detail?id=35400
Change-Id: I28e78b7375ee554b3afe98e5249676e8bbbbec0e
RLConnection.java
26010ab930a2cee3bf10b9612cf070183c21228b 24-Jul-2012 Elliott Hughes <enh@google.com> Declare that various Posix methods can throw SocketException.

Bug: 5177516
Change-Id: Icf2f06c7df6686dd1f54a930bc3fa50b1ce4e1d4
lainDatagramSocketImpl.java
b0e6dc5464f959b3d42f37b32f4b01767f6fe506 12-Jul-2012 Elliott Hughes <enh@google.com> Fix NetworkInterface.getNetworkInterfaces /proc/net/if_inet6 parsing.

It turns out that some devices can have very large interface indexes,
and my code was incorrectly assuming they'd always fit in 8 bits.

Bug: http://code.google.com/p/android/issues/detail?id=34022
Change-Id: I388a46ffe45f9706a4e28fb3b2975c991a74d419
etworkInterface.java
02a01a6ce390976b7c5cea95fe87c3020c797dff 12-Mar-2012 Jesse Wilson <jessewilson@google.com> Fix incorrect documentation for non proxy hosts.

Bug: http://b/6152698
Change-Id: I5b0bd61aeaf8d27c0087210859de1fd2cbcf88d7
roxySelector.java
75cf14944d476670f6f915e5efd849e238a16250 16-Feb-2012 Elliott Hughes <enh@google.com> Throw SecurityException for DNS without INTERNET permission.

When GoogleTV had to work around this for glibc, I realized that maybe I was
the problem, not the C library...

Bug: http://code.google.com/p/android/issues/detail?id=15722
Change-Id: Ia3fbf2f4578ad60d84e538819660c181248f1e1c
netAddress.java
e636ca4d6bd101324bd95fbc817401e6e0b80a2c 15-Feb-2012 Jesse Wilson <jessewilson@google.com> Introduce an ExtendedResponseCache interface.

We had an ugly bug where HttpEngine was inspecting its response
cache's implementation type, and calling stats tracking methods
if that type permitted it.

This worked for all the libcore tests, but not in practice since
the public HttpResponseCache class WRAPS the libcore HttpResponseCache.
The new interface makes the new APIs called by HttpEngine on its
cache explicit, and permits the public android.net.HttpResponseCache
to implement the API.

Bug: http://code.google.com/p/android/issues/detail?id=25418
Change-Id: Ic9697af96635256e7ffc24f86628a85fbe2defd4
xtendedResponseCache.java
esponseSource.java
e50d82455c813210a2d452070f45fd38d9903159 08-Feb-2012 Elliott Hughes <enh@google.com> Fix an ICS DatagramPacket bug.

Bug: http://code.google.com/p/android/issues/detail?id=24748
Change-Id: Iafab3a6c55007a47b68af5581148f5556f2fc808
atagramPacket.java
atagramSocket.java
afd70b773bd938c845a3bb0d9a3e21ec64d4db1a 07-Feb-2012 Elliott Hughes <enh@google.com> Rely more on the C library level DNS caching.

This change:

1. decreases the size of the libcore cache (to 16 hostnames).
2. brings the positive and negative TTLs way down (to 2s).
3. removes the dead code for the broken TTL-setting system properties.

Bug: 5841178
Bug: http://code.google.com/p/android/issues/detail?id=23878
Change-Id: Ib989c72bf3046300b4d59fa5ae49b8fe3ae6c2dc
ddressCache.java
netAddress.java
4bbc5de89764a9bcdb62c65be31e0f110578d427 07-Jan-2012 Elliott Hughes <enh@google.com> Cope with network interfaces disappearing while we're enumerating them.

Bug: 5833739
Change-Id: I2af2c3cd9dde66422786345cc22c9297b4b218ae
etworkInterface.java
5757cb35ad2e58d7accb7f5d3db6f2d5e72f097d 16-Dec-2011 Jesse Wilson <jessewilson@google.com> Support multiple challenges for HTTP authentication.

This fixes the problem reported in the bug, but we still need
to give attention to the digest scheme. Currently we can't do
Basic auth if the HTTP response contains both a Digest challenge
and a Basic challenge!

Bug: http://code.google.com/p/android/issues/detail?id=19081
Change-Id: Ifffb307678c2afa0db1d50c1ef5fc49ec7769306
uthenticator.java
ab7ae56666faffd5ad7aecfc07500ad5f4983ff2 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document pre-Froyo bugs in HttpURLConnection

Bug: http://b/5419660
Change-Id: I2742711092593ff70c38eba68f37343bb0eb4aee
ttpURLConnection.java
49bd35072553aaadfabbc3a09761632897169783 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document connect attempts by address count, not address family count.

Change-Id: Ie769d0d94909f39501337f516dc44b16c601dc22
RLConnection.java
2d9fa917aae6a6da38e9d1eda05841ffdf8855bb 15-Dec-2011 Jesse Wilson <jessewilson@google.com> Document the effect on timeouts of having both IPv4 and IPv6 addresses

Bug: http://b/3441111

Change-Id: Ib4c2e3e0d8d86eb5eb77cf92a0814c7444fd153f
ttpURLConnection.java
RLConnection.java
1ce4f4b41b4b52e50bee1f4c4912ccede16877cf 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Improve the text on disabling connection reuse.

Change-Id: I4e91d38e14e293fd2e6ea7fb77a4df72a697da6a
ttpURLConnection.java
0613de89655e481fa610bfd4f1bcaeeae3272205 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Document that disconnect() doesn't release sockets.

We could make disconnect() work, but it's a lot of complexity for
little gain. The core problem is that by the time the user calls
disconnect(), the connection has already been pooled. On the RI,
disconnect() will close a socket connection if it hasn't yet been
removed from the pool. Our pooling always-on or always-off behavior
is simpler and more predictable.

Bug: http://b/4148042
Change-Id: I61ef2ccb898f3ffaa08cedc70ee9e728fc1889b9
ttpURLConnection.java
64785533018893463bbab2e34959879bac446c8d 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Refer to Android ICS by its version in URL docs.

Bug: http://b/3408201
Change-Id: I03940a60af4650181dc6e5ceae712c06f8e61f84
RL.java
9e79136b626db72b0d80705a9417f5e81d38b400 29-Oct-2011 Elliott Hughes <enh@google.com> Merge "Improve the documentation of toString methods in the java.net package."
10914811ea02b4acc7ab1dc5a0ada1b54cdf2203 29-Oct-2011 Elliott Hughes <enh@google.com> Improve the documentation of toString methods in the java.net package.

A developer wanted to know why their InterfaceAddress string began with a "/",
which wasn't obvious from our crappy documentation. This kind of thing should
always include examples, so let's include some examples...

Change-Id: Ic0a555c880e7f2dd31e4801926523f1aa96461c8
netAddress.java
netSocketAddress.java
nterfaceAddress.java
etworkInterface.java
783631d82682027beaf80540ab08912fd56fea0c 29-Oct-2011 Jesse Wilson <jessewilson@google.com> Add a mode to UriCodec to handle invalid URLs without throwing.

Bug: http://code.google.com/p/android/issues/detail?id=21064
Change-Id: I0c0003bbacc5b9680d9f699134c02648e0d6dbea
RLDecoder.java
9b4a8ec37805be3eabf3a4b443bbdb692ffa2608 30-Sep-2011 Elliott Hughes <enh@google.com> Fix a couple of isReachable bugs.

We shouldn't throw NPE if you call isReachable on a deserialized InetAddress.
Fixed by removing the "globals", which also fixes the unreported bug that
calling isReachable on the same InetAddress was not thread-safe.

Bug: http://code.google.com/p/android/issues/detail?id=20203

Also, the arguments to isReachableByTCP in isReachable(NetworkInterface, int, int)
were the wrong way round, which meant we'd always return false (unless you were
asking if localhost was reachable).

Bug: http://code.google.com/p/android/issues/detail?id=20107

Bug: 2497441
Bug: 3213503

Change-Id: Ic808e774c28be6487e30e6acb8bc06f766f5c71d
netAddress.java
92cb29d71ca8fadc9b738a33e63ca39807647463 30-Sep-2011 Elliott Hughes <enh@google.com> s/Ipv6/IPv6/

Change-Id: I59cacdbde1fe65b849d542f8faa8c0c2c0f5cddf
netAddress.java
a7428d68453f6a74633221e8714f8d3d9597b2b4 29-Sep-2011 Elliott Hughes <enh@google.com> Fix the InetAddress/Inet4Address/Inet6Address documentation.

Also simplify a few of the implementations, and add a few tests.

Bug: http://code.google.com/p/android/issues/detail?id=19165
Change-Id: If33d5a830068114edf722711333bf0e00098d91a
net4Address.java
net6Address.java
netAddress.java
2ca11d6eae460f94bc42bc2e453fac93f4b94eb0 13-Sep-2011 Jesse Wilson <jessewilson@google.com> Discourage developers from catching subclasses of SocketException.

We recently had a bug in Apache HTTP client where catching a
specific exception subclass caused incorrect behavior. Apache HTTP
expects a ConnectException but we're throwing its superclass,
SocketException. Unfortunately I don't think fixing this to throw
ConnectException is any better; the best I can tell from the spec
this should be throwing a NoRouteToHostException which would still
fail on Apache HTTP client. I'm going to fix that code to catch the
appropriate type.

Bug: http://b/5293809
Bug: http://b/4411922
Change-Id: I189408f6e2355475510fb817c97017e7bae1739e
indException.java
onnectException.java
oRouteToHostException.java
ortUnreachableException.java
3267a46b52d848e1e9e20c226512688f0c50d4c3 25-Aug-2011 Jeff Sharkey <jsharkey@android.com> Return real FileDescriptor in Socket wrappers.

In classes that wrap another Socket, return the real FileDescriptor
from the wrapped Socket.

Bug: 5189186
Change-Id: I157feb6991def9110eaf0ea82365b6f5b95b9372
ocket.java
cf216b0bb538b3e555af205f4fad8064331b9265 12-Aug-2011 Jesse Wilson <jessewilson@google.com> Use the application's class loader for URL stream handlers.

We had a test URLStreamHandlerFactoryTest.testInstallCustomProtocolHandler
that was failing when run in an APK without this fix. The new behavior
is definitely what Android applications will want!

Change-Id: I2266a8aea6da833022b538c1f424a3099684d992
RL.java
98c564c72480313ae2954a7f0b666ff94345a2f1 25-Jul-2011 Jesse Wilson <jessewilson@google.com> Only permit square brackets on IPv6 addresses.

We were failing two tests in URLTest because we were accepting
IPv4 addresses and host names.

Note that in the RI, URL is extremely lenient on validating the
characters in the parts of a URL. It permits any character in any
part except for the delimiter characters like '/' or ':'. The
lax IPv6 check 'does it contain a colon?' is consistent with the
RI.

Change-Id: I957f2ee610b72cf68a7773b4c02a4b6d5fcbb9de
RLStreamHandler.java
71ad1ba183f0cad222cb80a11b2f8afc03362416 14-Jun-2011 Elliott Hughes <enh@google.com> Simplify & optimize DatagramSocket's implementation.

In particular, recv on a connected socket now costs no more than it should.

Bug: 1974286
Change-Id: I72c16ec82d1537753a9da146c2672515b2ed6990
atagramSocket.java
ulticastSocket.java
4f54203252733229489e6d09c7d3e0aaa82754d6 06-Jun-2011 Elliott Hughes <enh@google.com> Merge "Remove more dead "security theater" cruft." into dalvik-dev
e26b27faf689c17b7894c78caee32432176349ec 04-Jun-2011 Elliott Hughes <enh@google.com> Remove more dead "security theater" cruft.

There's probably still more stuff lying around that isn't useful,
but this was all I had time for on this particular Friday afternoon...

Change-Id: I69593f6c9ab5534d581c703cc85a9766ba8e40e5
etPermission.java
ocketPermission.java
ocketPermissionCollection.java
fc041ff241f9a7556e72236f130de0215ecd17db 03-Jun-2011 Elliott Hughes <enh@google.com> Remove support for deprecated IPv4 address formats.

Bug: 4539262
Change-Id: Ic42173b7b06e8536e8c4331087720d7df1e1681a
netAddress.java
4596cf129099ade7ec2ec17543d68db03d2f45bd 28-May-2011 Elliott Hughes <enh@google.com> am ee100f24: Merge "Make ErrnoException a checked exception."

* commit 'ee100f24d3b9d538dfc0ec9c9e74b6670e0a2a1f':
Make ErrnoException a checked exception.
9b510df35b57946d843ffc34cf23fdcfc84c5220 28-May-2011 Elliott Hughes <enh@google.com> Make ErrnoException a checked exception.

Bug: 4486011
Change-Id: I1877ce593d441653f75ab14884aa2d85f52652ad
netAddress.java
lainDatagramSocketImpl.java
ecf950e56b55f95a960f151268286576159c6530 27-May-2011 Jesse Wilson <jessewilson@google.com> Relative/absolute and opaque/hierarchical docs for java.net.URI.

Change-Id: I5ec2e1dd10a3c676441caf56838433fffa316a59
http://b/2753295
RI.java
c68609e723a5daa20888abdb640799d4353fd590 27-May-2011 Jesse Wilson <jessewilson@google.com> Document java.net.URI.

Change-Id: I941ba9cb4a2d48b052c25b7799ac466549df8d53
http://b/2753295
RI.java
RL.java
73d0c8232b23ad74af5cc198143603ff6ee5236b 27-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Clean Up URI's parsing code." into dalvik-dev
ce257b03a1e5ff6075967e6a84cdb439cb2b01c8 27-May-2011 Jesse Wilson <jessewilson@google.com> Clean Up URI's parsing code.

http://b/2753295

Change-Id: I190ee12c14d1b3b17e2c8cb5ef3868618f1ee124
RI.java
RLStreamHandler.java
fefa79414d785f556bd887e4e035f49b2be5e38f 27-May-2011 Elliott Hughes <enh@google.com> Merge "Match the RI's exact exception type." into dalvik-dev
c61ad82613eb264cbf93e91519b0c061d11b3c2d 27-May-2011 Elliott Hughes <enh@google.com> Match the RI's exact exception type.

Change-Id: Id64b8ff87198e31a93a92d19d542948bcbb74db0
ocket.java
2d99ef561304174b8ae01a0a68d5b96d5edb9f10 26-May-2011 Jesse Wilson <jessewilson@google.com> Fix URI to behave more like the spec and browsers and less like the RI.

When computing relative paths from URLs like foo.com/a to foo.com/a/b,
this now uses "a/b" as the relative path and not just "b". That was an
RI bug that we were foolishly compatible with.

Change-Id: I6e3f10d84602c08bbf6bd7c7e43c2ba3387e4c3b
http://b/2753295
RI.java
RLStreamHandler.java
c5727263001f1eae068f7821063d7bfb2da8e24c 26-May-2011 Jesse Wilson <jessewilson@google.com> Use canonicalizePath in URI.

This needs to add another mode to canonicalizePath to not
discard ".." prefixes from relative paths.

Change-Id: I9e0b86bd1e7ab8e5e71c46f1efcf4aeb218e66b2
http://b/2753295
RI.java
RLStreamHandler.java
5292410e4ebf7fb5149eefd2f52fcb94c46690a6 24-May-2011 Jesse Wilson <jessewilson@google.com> Rewrite parsing for java.net.URL.

This fixes many broken cases on handling relative URLs.

We normalize all URLs by default. This will result
in more URL equality than before. Previously the URLs
http://android.com/a/../ and http://android.com/ were not
equal; now they are equal.

Change-Id: I8cf7be2e42eeb1386520be2698d8f14e0a55decb
http://b/4361656
RL.java
RLStreamHandler.java
5c3bf9578b9f6c49da8b72e2e7fb9e33a27c124f 21-May-2011 Elliott Hughes <enh@google.com> Merge "Suppress some FindBugs warnings." into dalvik-dev
8f99aa098c6a06b8be788abbca1c1d1060342709 21-May-2011 Jesse Wilson <jessewilson@google.com> Cosmetic cleanup of java.net.URL.

Update the documentation to be closer to reality.

Change-Id: Ic187efde5d83c6bfcdc80428429a2d0f186d9d0a
http://b/2753295
RL.java
RLStreamHandler.java
0d4daefcf389b6433a0af481ef44a84a2546541a 21-May-2011 Elliott Hughes <enh@google.com> Suppress some FindBugs warnings.

Also globally replace "for(" with "for (".

Change-Id: I27fe17460e6745b9ca823f42e57c86fe8af31979
netAddress.java
etworkInterface.java
RLClassLoader.java
0b736ebc4efef64f2db1999aea90297ad8196146 20-May-2011 Elliott Hughes <enh@google.com> Move the stuff to bridge between io/net/nio semantics and POSIX semantics.

IoUtils should be more generally useful.

Change-Id: I5665f2a94d226ada3077a30045549a53cc741cf0
atagramSocketImpl.java
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
ocket.java
553d98af897f7202de5e5a776287de0b5ca8fe39 19-May-2011 Elliott Hughes <enh@google.com> Expose accept(2).

The implementation of PlainSocketImpl.accept is made ugly by the fact that the
SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we
need to mutate the FileDescriptor itself, and can't simply swap in a new one.
I've raised http://b/4452981 to see if we can integrate the nio and io socket
classes more closely, to avoid this kind of mess.

Bug: 3107501
Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
lainSocketImpl.java
ocketTimeoutException.java
4728a015bcd3f432e000d1547c668e804015dc04 19-May-2011 Elliott Hughes <enh@google.com> More IPv6 sin6_scope_id fixes.

My earlier patch fixed the Java-to-native direction. This fixes the
native-to-Java direction, which didn't occur to us at the time.

I've also fixed the documentation so that public methods don't
define themselves in terms of a private method (that ought to
exist in the public API, but doesn't).

Change-Id: Ib16a5952bb69b0b96a66775304947f2a120a1dcf
netAddress.java
23ec09188303a874b3b391f96ae0a29af002bff9 19-May-2011 Elliott Hughes <enh@google.com> Implement recvfrom(2).

This one's a little bit hairy because of multiple return values.

Bug: 3107501
Change-Id: I3bd35647d94bb6bc2192d6f31a39ecca07a3926e
netAddress.java
netSocketAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
59e5a4761c267d31ba5d6e0573a0473647c3b56e 18-May-2011 Elliott Hughes <enh@google.com> Merge "Fix Inet6Address (de)serialization." into dalvik-dev
f02f9397fd5984f476e056ddb8c04db9af9a15a0 18-May-2011 Elliott Hughes <enh@google.com> Fix Inet6Address (de)serialization.

Looks like it's valid to have scope_ifname_set == true, but ifname == null.

Change-Id: Ic37cf40ae91ff0edaf1e66ccd09819fee9c41d99
net6Address.java
ad5d31103472d57f5744ff5a03c3bc38dcb34740 17-May-2011 Elliott Hughes <enh@google.com> Fix InetAddress.isReachable.

Change-Id: I4b90b711642515a3abda54d176337738bdda1312
indException.java
onnectException.java
netAddress.java
90d96a4f168b7e56cff54dc94dca2f3cde60ebcd 17-May-2011 Elliott Hughes <enh@google.com> Add sendto(2) and reimplement all network writes in terms of it.

Note that this doesn't fix http://b/4182806.

Bug: 3107501
Change-Id: I9b56eae226389a63a12b4c0499d40d5a54a462e2
lainDatagramSocketImpl.java
lainSocketImpl.java
e27d02044ec399884bfd4343d513bf270b9b9b11 16-May-2011 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.close.

For now I'm keeping AsynchronousCloseMonitor as a special case in native code.
We can see about doing something more general-purpose in a later pass.

Bug: 3107501
Change-Id: Ib79b9fc0bebfafc2d14896d957bd8591ae8e6e97
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
29965ad146fe99ef4bbe70701f3d4413750506e4 13-May-2011 Chia-chi Yeh <chiachi@android.com> am c1c180ba: Add a method to get FileDescriptor from DatagramSocket for internal use.

* commit 'c1c180bace58e44b4e555fdb994deedc011ad882':
Add a method to get FileDescriptor from DatagramSocket for internal use.
c1c180bace58e44b4e555fdb994deedc011ad882 13-May-2011 Chia-chi Yeh <chiachi@android.com> Add a method to get FileDescriptor from DatagramSocket for internal use.

Change-Id: I437530d8c8cc840310dea38bcc9973c4973806c8
atagramSocket.java
2bad9bff258de6275bd3847e5e9f3169b0a93c61 12-May-2011 Elliott Hughes <enh@google.com> Reimplement OSNetworkSystem.isConnected in Java.

We can do this in Java now we've exposed poll(2).

Change-Id: I9f2700d09134198c1cd2681e3814fb482e8e271c
alformedURLException.java
oRouteToHostException.java
ortUnreachableException.java
rotocolException.java
ocketException.java
ocketTimeoutException.java
nknownServiceException.java
f589846f86761ffea3c06ab9d105d3f19328d121 11-May-2011 Jesse Wilson <jessewilson@google.com> Address code review comments to Adopt DiskLruCache change.

That change was submitted too early. This is the missing
follow-up.

Change-Id: I521455a7d249f8841c989561775c91d4368a8966
http://b/3180373
RLClassLoader.java
32b0fa4d1a31ef07bc4297c615f0fe50e9aa7c21 11-May-2011 Elliott Hughes <enh@google.com> DatagramSocket.disconnect is really a connect(2) of an AF_UNSPEC sockaddr.

Bug: 3107501
Change-Id: Ib04369b9ca63ff3fe7eb87dcbf2926fe704813e3
net4Address.java
net6Address.java
netAddress.java
lainDatagramSocketImpl.java
996bf79565ac88402920bd826d6f85952c83be20 10-May-2011 Elliott Hughes <enh@google.com> Expose connect(2).

The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one
in NetFd.h, but during the transition we need both. The new one also takes care
of the asynchronous Socket.close semantics, and changes the behavior when the
FileDescriptor is invalid on entry: that is now reported as EBADF; it's only
reported as "Socket closed" when we've been round the loop at least once,
giving us reason to believe the socket was ever open. Having had to debug this
distinction, I think the new semantics are less confusing.

Bug: 3107501
Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
onnectException.java
lainSocketImpl.java
da15009528cc8300a6251f1d0931ac8657c9fc31 09-May-2011 Elliott Hughes <enh@google.com> Expose bind(2).

I've renamed the java.net.InetAddress to struct sockaddr conversion functions
too, after initially screwing up this patch by copy & pasting a usage of the
one that only one caller actually wants. Now the name's so ugly no-one will
be likely to use it by accident.

Bug: 3107501
Change-Id: I869a8d27fc40e462505e02bf25a67e771a403e92
indException.java
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
49ff8b8582bca20a1adbda1d957220526332a8ca 06-May-2011 Elliott Hughes <enh@google.com> More networking cleanup.

Move a bit more work into Java.

Change-Id: I656ec6e3c792ce9baed32662d65c45d75af1d371
lainSocketImpl.java
a3b57e9cb41fb00ac607cd330fa73270b564b66c 06-May-2011 Elliott Hughes <enh@google.com> Fix non-blocking DatagramChannel.receive and ServerSocketChannel.accept.

The former problem was the reported bug, but the latter was another instance of
the same mistake, and much harder to fix.

The interesting change here is that we now create the SocketImpl (and thus the
underlying OS socket) for a ServerSocket much sooner than we used to: if the
constructor doesn't throw, you've got yourself a usable socket.

Bug: http://code.google.com/p/android/issues/detail?id=16579
Change-Id: Iac8b707e74cd1367ee0fdc22fc3969677cfa566c
atagramSocket.java
lainServerSocketImpl.java
erverSocket.java
ocketImpl.java
d742d7fc7f0593eb8c6e4ac9dd4c0f6a80374e46 05-May-2011 Jesse Wilson <jessewilson@google.com> Use GET after a POST is redirected.

Also dropping support for response code 305 Use Proxy, which
is seldom used, and whose behavior is quite different from
Chrome and Firefox. This is an intentional delta from the RI.

Also testing disconnect().

Change-Id: I80433f4776a2cfc5e228179421a787a44a4ded69
http://b/3180373
ttpURLConnection.java
RLConnection.java
ce1150d9897bd5baf66de4a8db132afce18be15a 05-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Refactor HttpURLConnection implementation." into dalvik-dev
953df613522e12a418cb7cb73248594d6c9f53d4 03-May-2011 Jesse Wilson <jessewilson@google.com> Refactor HttpURLConnection implementation.

Break HttpURLConnectionImpl into two parts: the part that
implements the Java API (that follows redirects etc.) and
the part that speaks HTTP. The HTTP part is called HttpEngine,
and it can only be used for a single HTTP request. This makes
it easier to set request properties that only apply to a
single socket request.

Tests for 'Vary', 'Content-Location' and warnings.

For simplicity of implementation I've chosen not to support
'Vary' at this time.

The 'Content-Location' header doesn't require any work from
the cache.

Warnings are ugly but allow the caller to identify when the
cache results may be problematic.

Also breaking HttpResponseCache's dependency on HttpURLConnectionImpl
so it can be tested on the RI.

Change-Id: Idbabb51251f479c2cdea4e0fceb029bfd07182be
http://b/3180373
ttpURLConnection.java
RLConnection.java
1c039d71d3879f39e3a75b8788e656f7b4f88f08 05-May-2011 Elliott Hughes <enh@google.com> Add getaddrinfo(2).

This only supports the "node" side of getaddrinfo(2), not the "service" side.
There's also no support for AI_CANONNAME, so we currently return InetAddress[]
rather than anything equivalent to C's linked list of struct addrinfo.

Bug: 3107501
Change-Id: I8cf6baa3027a0fa05ac6e2f8fcc1dd8b576ff8c4
netAddress.java
RI.java
220c0af1763283b75617226efe3919c3e3b044c8 30-Apr-2011 Elliott Hughes <enh@google.com> Rewrite blocking connects in terms of the non-blocking primitives.

This simplifies OSNetworkSystem, getting us closer to replacing the
connect(2)-related bits with our new POSIX interface. It also lets
us remove cruft on the Java side that was resetting the socket's
blocking/non-blocking state (which should never have been touched),
which in turn fixes bug 4193212.

Detail messages for socket timeouts get better too, now we're throwing
on the Java side.

The only thing that's worse is that we used to get away with throwing
a checked exception from native code, which simplified our "throws"
clauses. Now we actually have to jump through a few hoops to make javac
happy. (Especially awkward because SocketTimeoutException isn't a
SocketException.) Stupid checked exceptions.

Bug: 4193212
Bug: 3107501
Change-Id: I00695d22094e6d785458dfbb7050fbaecf2db89f
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
ocketException.java
0c59055dd24e1659f85d9ff7e2148883f663bd62 27-Apr-2011 Jesse Wilson <jessewilson@google.com> Support conditional gets in HttpURLConnection.

This is the first step towards adding an HTTP response cache.
There's still much to do; details are listed on the bug.

Change-Id: Ie693fe424d1d90e90576fc959595e4d96a31f767
http://b/3180373
ttpCookie.java
RLConnection.java
6ab70f360e76509de958d6e7ea26b6ca3150c071 22-Apr-2011 Elliott Hughes <enh@google.com> Remove a work-around for a problem we don't think can occur.

We should always have a fully-qualified name at this point, so this
shouldn't be possible.

Change-Id: Icc7d6c16f51080c36ef4687744d7a42206a140a0
netAddress.java
a37e971343883bb582a93ffbd9f0ba84f10e55ba 21-Apr-2011 Elliott Hughes <enh@google.com> Rewrite NetworkInterface.

This is part of the POSIX work, but also fixes a bug that asked for down
interfaces to be returned. Additionally, I found a few bugs while rewriting
this code. Most notably, we used to return a bogus broadcast address for
the loopback interface. The only difference I notice between us and the RI
when running on the host is that the RI claims that 127.0.0.1 has a prefix
length of 0 rather than 8. I believe that we are correct on this issue.

Bug: 4082343, 3107501
Change-Id: I677e0698e3a86676b4332b5d56fe514a99c3ddc0
indException.java
net6Address.java
nterfaceAddress.java
alformedURLException.java
ulticastSocket.java
etworkInterface.java
oRouteToHostException.java
ortUnreachableException.java
rotocolException.java
ocketException.java
ocketTimeoutException.java
nknownServiceException.java
ae394a866dd86df8819b652dfe00b3d2c7ee204c 20-Apr-2011 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv6Addresses", which has been true since Eclair.

Also ensure all javadoc references to RFCs are links.

Change-Id: I58b08a8ead08d6eab018e19ec2cff7d60f2b06e6
ookieManager.java
ookiePolicy.java
ttpCookie.java
DN.java
net4Address.java
netAddress.java
ulticastSocket.java
ocket.java
RI.java
RL.java
RLConnection.java
775095bf6a763e6a9b4e858011a812425d949af5 20-Apr-2011 Elliott Hughes <enh@google.com> Remove an unnecessary special case in InetAddress.getAllByName.

(And add a test to ensure it remains unnecessary.)

Change-Id: Ia1b4f0721308a36d972da36c06869ce4740b1cda
netAddress.java
4f11ebea266eada830d507b8f011e811a8e5d7bc 20-Apr-2011 Elliott Hughes <enh@google.com> Add getnameinfo(3) (and gai_strerror(3)).

There's quite a large corresponding change to InetAddress, plus I've changed
the documentation for all the Permission classes to match the handful that
we'd already documented as legacy cruft.

Bug: http://b/3107501
Change-Id: Ia67aba79f0ab13e64085bd4a2df20ad0776bcc5b
net4Address.java
net6Address.java
netAddress.java
ulticastSocket.java
etPermission.java
ocketPermission.java
ocketPermissionCollection.java
8bccf8cdf7a3b8a6e90bb1b411a957b6368e4a1a 12-Apr-2011 Brian Carlstrom <bdc@google.com> Improve HttpsURLConnection documentation with examples

http://code.google.com/p/android/issues/detail?id=16041

Change-Id: I2e596ef36306b70cdb071b91d8707f015d9b251b
ttpURLConnection.java
b974666d79ebc392b37ec1ae83aae57ae6331c08 06-Apr-2011 Elliott Hughes <enh@google.com> Finish setsockopt(2).

Bug: 3107501
Change-Id: I8f026dcba78acb555834bdcc594e114238f3cc52
atagramSocket.java
ocketOptions.java
1208f030332b3e1eae3d55d416f1af1d68f7e33d 05-Apr-2011 Elliott Hughes <enh@google.com> More MulticastSocket cleanup.

Only getInterface still has any hackery left.

Change-Id: Ica1a3263db6d073e0ec42896591ff4c2e17452ff
ttpURLConnection.java
ulticastSocket.java
ocketOptions.java
c3d19477189eafcdfec5735f9e5e13ffdeaf963d 05-Apr-2011 Elliott Hughes <enh@google.com> Slightly simplify MulticastSocket.

Part of the code is actually a new public method in Java 7, and another part
is just compatibility cruft for IPv4-only stacks.

(I think there's plenty more to clean up in here, but I'm being cautious and
breaking it into separate changes, each of which have no effect on the tests.
My hope is to remove the use of SocketOptions.IP_MULTICAST_IF entirely, but
I'll settle for being able to justify why we still need it, if we do.)

Bug: 3107501
Bug: 3484927
Change-Id: Icb4b3c1180dcd8b5666a4a969353a881ca97888e
ulticastSocket.java
etworkInterface.java
438cb9e440d250c8aa5daf4fae0c400dce8b1499 02-Apr-2011 Elliott Hughes <enh@google.com> Add MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP setsockopt(2).

Bug: 3107501
Change-Id: I576f45f8c67b6172888bc0541e3d3a462bfa311a
ulticastGroupRequest.java
lainDatagramSocketImpl.java
c63f0d4e80a9fd3bdf99cd438d108b750226736a 02-Apr-2011 Elliott Hughes <enh@google.com> Add more of setsockopt(2).

This covers all the easy cases. I'll do the awkward ones separately.

Bug: 3107501
Change-Id: Ie424290e0bef76516d0c57e9c077cb1c202381ad
atagramSocket.java
lainDatagramSocketImpl.java
lainSocketImpl.java
dc33f53f38600943c84146320c748e3c46fd2e7b 01-Apr-2011 Elliott Hughes <enh@google.com> Don't cache the underlying Socket's underlying SocketImpl's underlying FileDescriptor in OpenSSLSocketImpl.

(OpenSSLSocketImpl, of course, being a Socket, not a SocketImpl.)

Bug: 4192414

Change-Id: I3c7d0fed70b1b98dc8fcc73f35b3feb0e1eeb2f9
ocket.java
0a9d1ee45a9884a9616624d747172e18734e8fe0 31-Mar-2011 Elliott Hughes <enh@google.com> Add getsockname(2) and getsockopt(2).

Bug: 3107501
Change-Id: Ibb0d5a576ecb46e51dbda6051776145eec9e7fe1
atagramSocketImpl.java
lainDatagramSocketImpl.java
lainSocketImpl.java
ocket.java
454a95f6a28855aa3c88d168b15a45bf315efc99 30-Mar-2011 Elliott Hughes <enh@google.com> Add socket(2) and start adding setsockopt(2).

I've added just enough setsockopt to keep the hack from our old socket
creation code. More later (but not necessarily right away).

Bug: 3107501
Change-Id: Id57bdd3c760bc58ed79d675b268c55493cbc24c8
netAddress.java
lainDatagramSocketImpl.java
lainSocketImpl.java
8b15dcc5890963edad4dfcf558cc16027c7985e5 29-Mar-2011 Elliott Hughes <enh@google.com> Add sendfile(2).

This patch marks the end of OSFileSystem.

Having to support a Java "long*" for sendfile(2) gave me an opportunity to go
back and improve my ioctl(2) to use a corresponding "int*" equivalent, instead
of its previous special-case hack.

Bug: 3107501
Change-Id: I9fde4777700552263fab4fe9aeb556174163e3dc
ocketImpl.java
461d0d860814c68154d8dd06d24f94118f33d28a 29-Mar-2011 Elliott Hughes <enh@google.com> Add ioctl(2) for int*.

I'm not adding the "struct ifreq" stuff yet because that's really hairy and I
plan on rewriting the NetworkInterface implementation anyway, so it'll mainly
be based on /proc. With any luck, we won't even need those other ioctls then.

I'm not sure _this_ ioctl is a good idea, but it does seem like a slight
improvement on the old code, and we can always move it back out if/when these
APIs become more public.

Bug: 3107501
Change-Id: Iceac15e4a107c33bfc8795976a747c2ffa59a183
lainSocketImpl.java
0519c0de2e55eeb3566c5ee913a500eb45886f7f 25-Mar-2011 Elliott Hughes <enh@google.com> Better detail message when HttpURLConnection.setRequestMethod fails.

To wit:

java.net.ProtocolException: Unknown method 'post'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]
at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:639)

Bug: http://code.google.com/p/android/issues/detail?id=15721
Change-Id: Ib4c185247985628a4df7e591f87e1c2c8e58ebdb
ttpURLConnection.java
4b928b95fe25f70e430f9bb73d7f0f7705a828e9 25-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix inconsistencies in HttpURLConnection docs." into dalvik-dev
7341b9ed7157a1e37a3e69a0974676da358b735a 24-Mar-2011 Elliott Hughes <enh@google.com> Add uname(2).

This replaces InetAddress's use of gethostname(2), and System's hard-coded use
of uname(2) itself.

Bug: 3107501
Change-Id: I7e808177eece1e38428fea18a96c65628d51d93e
netAddress.java
e1502d64e937001636fca3d62b2552ef2a34d05f 24-Mar-2011 Elliott Hughes <enh@google.com> Add listen(2).

Bug: 3107501
Change-Id: I3677bb4ddb3f3d0e58a6833165504f47bb309630
atagramSocket.java
lainSocketImpl.java
ocketImpl.java
59e4744d27231f260271dbbca406e0cc39768116 24-Mar-2011 Elliott Hughes <enh@google.com> Add shutdown(2).

Bug: 3107501
Change-Id: I30354c4cc6e86a4e7b0e3f84e95719539db1d297
lainSocketImpl.java
c2ebff3511f9df4d8cca2b82630c2d760af9d204 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Prefer the user's stream handlers to the built-in ones.

Apps may use this to install their own protocol handlers instead
of the default ones. This is used for HTTP NTLM authentication
in some libraries.

Change-Id: Icd5882e8ddd0545f897bee916150765e02929fc9
RL.java
eb09bc383703f0b2d6c99daf83479d5ce573a2f9 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Fix inconsistencies in HttpURLConnection docs.

Change-Id: I999b2cf7b904659923e02111aa62946d488e159e
http://code.google.com/p/android/issues/detail?id=14933
ttpURLConnection.java
5aafac4db69e6d087c512cdfa5c7c0e2f1611681 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Move URLConnection classes to libcore.net.

Change-Id: I14bf8373dfce50dda94e1a64419b9a8a9cf3c82e
ttpURLConnection.java
RL.java
32c2297a959b72abdb18743f0519e1d8b7c7ea88 17-Mar-2011 Elliott Hughes <enh@google.com> Remove bogus "super()" calls.

I've left one in java.util.concurrent, since we have an upstream there.

Change-Id: I60945e48a41433fc7eaef6086433ec4bf434097f
indException.java
acheRequest.java
onnectException.java
atagramPacket.java
atagramSocket.java
alformedURLException.java
ulticastSocket.java
oRouteToHostException.java
lainDatagramSocketImpl.java
lainSocketImpl.java
rotocolException.java
ecureCacheResponse.java
erverSocket.java
ocketAddress.java
ocketException.java
ocketPermissionCollection.java
ocketTimeoutException.java
ocks4Message.java
nknownHostException.java
nknownServiceException.java
f934c3d2c8dd9e6bc5299cef41adace2a671637d 15-Mar-2011 Elliott Hughes <enh@google.com> Make OSMemory the semi-supported libcore.io.Memory.

Looks like we're not going to bother with a separate libcore.os package,
when libcore.io will do.

Change-Id: I2806c59349ed4b6410d768c4207c384ced973c54
net4Address.java
netAddress.java
lainSocketImpl.java
ocks4Message.java
2f03ccad590827233fcba84a8b6eafcd414e5fe7 08-Mar-2011 Elliott Hughes <enh@google.com> Use -fvisibility and clean up a little.

The visibility change isn't obviously useful, but it's a good excuse to clean
up some of our networking code a little.

Change-Id: I165b32b9c76a3707c512e07de07992f63673ab4f
lainDatagramSocketImpl.java
3393bc90a5bd4498add5b70df1c43e54e5a2f843 08-Mar-2011 Elliott Hughes <enh@google.com> Remove an unused local and improve a comment.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I9924ecbdeafc608bcf972b29d3926de4df616975
lainSocketImpl.java
ff8234c90ecab9f1db368924bf92a5b16460f9b5 08-Mar-2011 Elliott Hughes <enh@google.com> Factor out our single-byte InputStream.read/OutputStream.write implementations.

Change-Id: I00106a51a32ea84a39256d5629369170b892a039
lainSocketImpl.java
608263018762d64a07276b7c8f58102455ccecc8 08-Mar-2011 Elliott Hughes <enh@google.com> Fix short writes in Socket OutputStreams.

Also tidy some code and fix some comments.

The OpenSSL OutputStream is already correct: it handles this in the native code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I69645543ec01f1eecdae4418f86c3a1911c0f752
lainSocketImpl.java
ocketInputStream.java
ocketOutputStream.java
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
ocketInputStream.java
ocketOutputStream.java
8de7cf6bff36093dda9e25a1ab3718720cb54906 07-Mar-2011 Elliott Hughes <enh@google.com> Move the various concrete SocketImpl classes into java.net.

Also do some trivial tidying of dead code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: If7186dda6bf31e2c2ef00ac6f386cbc9a78847fd
atagramSocket.java
ulticastSocket.java
lainDatagramSocketImpl.java
lainServerSocketImpl.java
lainSocketImpl.java
erverSocket.java
ocket.java
ocketImpl.java
ocketInputStream.java
ocketOutputStream.java
ocks4Message.java
4f9ffffd8a2835c30647f9785afb48fa96a0f045 05-Mar-2011 Elliott Hughes <enh@google.com> Add new InetSocketAddress.getHostString method.

Bug: 3484927
Change-Id: I265ed467b733b9d5842e2e0bf14af1eddc8e0de2
netAddress.java
netSocketAddress.java
5d3f5562c167120b5ec00e509af0f0ab9308bff5 04-Mar-2011 Elliott Hughes <enh@google.com> Add InetAddress.getLoopbackAddress.

Bug: 3484927
Change-Id: Ic5305c852ed8079d958d8ab7c46fe10cceac60d4
netAddress.java
ae06196267319eef727892d9e13bdecea3482e34 24-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: dead code in Socket(Proxy).

From the SecurityManager removal.

Change-Id: Ie822bc02453b1020a8ad6d9337b2d997c475659b
ocket.java
93942160263480b1ffdd4030036cf6994c616b9c 24-Feb-2011 Elliott Hughes <enh@google.com> am 46bed6a4: Make InetAddress.parseNumericAddress more like InetAddress.getByName.

* commit '46bed6a47a20d8105f0e099d162d547a7964b4fe':
Make InetAddress.parseNumericAddress more like InetAddress.getByName.
46bed6a47a20d8105f0e099d162d547a7964b4fe 24-Feb-2011 Elliott Hughes <enh@google.com> Make InetAddress.parseNumericAddress more like InetAddress.getByName.

Specifically, treat null and "" as requests for the loopback address.

Bug: 3483011
Change-Id: I656f1d2873faf4b73e1fc7621c96183a8a86992b
netAddress.java
eba235c7faa8157de8bcfc6ce29a48e196100bfb 24-Feb-2011 Elliott Hughes <enh@google.com> Don't @see a private field.

Change-Id: I7acd9200acfa46c38b4deb61fff337f0d19fcaed
RLConnection.java
f5fc66d0a21d4369e17e14d4a86d1a7b2d2678b2 23-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge commit '6dfa1ea0' into manualmerge

Conflicts:
luni/src/test/java/libcore/java/net/URLTest.java

Change-Id: Idcc92efa678d32ec1c9fa22bc6877f9582ff319e
8216dc1fd9d31867770439985c3d66570330e4c7 23-Feb-2011 Elliott Hughes <enh@google.com> Remove most of our remaining non-API StringBuffer usage.

Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1
RLConnection.java
244449b9ccd108197d1c117edda99cd93a891d49 23-Feb-2011 Elliott Hughes <enh@google.com> Fix a comment and remove some duplication.

Change-Id: I67bb9f1c71c774e04698a3e489bd48e9b27b2b64
RLClassLoader.java
6c434a1215049a76ba82fea69e8c5aa76cad955b 21-Feb-2011 Jesse Wilson <jessewilson@google.com> Fix URL.equals() to not throw on null hosts.

Change-Id: Ib89c902a10b28dc7e78600b44a3f1ff230f9b553
http://b/3474668
RLStreamHandler.java
6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c 18-Feb-2011 Elliott Hughes <enh@google.com> Fix various FindBugs warnings.

Only the ChunkHandler and ZoneInfo ones were real bugs. The former is only
called with one input value that doesn't exercise the bug, and the latter
would cause us to think that a time zone that stopped using daylight time
before 1970 was still using daylight time (which would defeat various
optimizations, but should otherwise be harmless).

The other stuff is trivia not worth individual changes.

Change-Id: Ib0752560cd16edc6538d1fc2b234451a66d48171
RLClassLoader.java
4ffe5900ca8922ad33639f9f73cb30b8f6721363 16-Feb-2011 Elliott Hughes <enh@google.com> am f39b892d: Add InetAddress.parseNumericAddress for frameworks/base\'s benefit.

* commit 'f39b892d87e85835f021e8ad77ffdd215735604b':
Add InetAddress.parseNumericAddress for frameworks/base's benefit.
f39b892d87e85835f021e8ad77ffdd215735604b 16-Feb-2011 Elliott Hughes <enh@google.com> Add InetAddress.parseNumericAddress for frameworks/base's benefit.

Bug: 3300307
Change-Id: Ifb2207621232314046aee39fdb86b957b9e7f8fc
netAddress.java
6f29fe0f1a0a42d773fb435e132d8dea9b59a11d 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge commit '7d95dd2e' into manualmerge

Conflicts:
luni/src/main/java/java/net/AddressCache.java

Change-Id: I32c78e56b5b7ac078e75bacfe7ec176962e777c5
7d95dd2ed60350f90fe64c33cbde58e5c2a72c83 10-Feb-2011 Jesse Wilson <jessewilson@google.com> Adopt BasicLruCache in AddressCache.

Change-Id: I08a5e82e123920762ad9a9c87bbe3045f17e33a9
http://b/3184897
ddressCache.java
32559028b14b9b321b10eede050afd554a376569 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Use the same code to encode and fix poorly encoded URLs.

Don't permit digits outside of ASCII.

Change-Id: I47b756c32e67b7415e35ae9eb55b735d1c22a36d
http://b/3436051
RLEncoder.java
RLStreamHandler.java
56099d23fcb002b164bff8fb7f14d6ec0453509e 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Remove redundant URL encoders and decoders.

http://b/3436051
http://b/2753295

Change-Id: I5836eab395214767efa4a3d8e8002cff72738854
RI.java
RIEncoderDecoder.java
RLClassLoader.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
e26ba79900d471d02d656f686926918ef7dc751f 08-Feb-2011 Elliott Hughes <enh@google.com> Use int.class instead of Integer.TYPE (et cetera) for clarity.

I've also removed some small amount of duplication and a few unused imports.

Change-Id: Ie52477484bade74c80a348ad1261b596f9053cf6
net6Address.java
netAddress.java
26ce8fbd8fe488cc969b08f64c56525662763dc4 08-Feb-2011 Jesse Wilson <jessewilson@google.com> resolved conflicts for merge of 6186821c to dalvik-dev

Change-Id: Ic6f0172767d6feedb188d3a5e7488a67702ef8c4
6186821cb13f4ac7ff50950c813394367e021eae 08-Feb-2011 Jesse Wilson <jessewilson@google.com> Move libcore.base classes to libcore.util and libcore.io.

Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
ttpCookie.java
net6Address.java
etworkInterface.java
RLStreamHandler.java
28eb98ecd43c27702e85b0561e040e2da10320a6 05-Feb-2011 Elliott Hughes <enh@google.com> Fix serialization of DecimalFormatSymbols.

Missing 'final' on the serialPersistentFields declaration meant we were
falling back to reflection, and 'exponential' isn't actually a field.

I've checked all the other serialPersistentFields fields, and put them
in a canonical form. There were no other errors.

I'll do two other related changes: I'll replace confusing use of Character.TYPE
with char.class (and so forth), and I'll backport the active ingredient from
this change so it's fixed in honeycomb-mr1.

Bug: http://code.google.com/p/android/issues/detail?id=14495
Change-Id: I954da649ad597450bee54957dc0e3d3aa9d151dd
net6Address.java
netAddress.java
7e00db4156e50ce5f20fefb820dca339299134d3 30-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't do DNS lookups in URL.equals()

Change-Id: Iea9becdb3a16eab054f9073719c77c2215ce0208
http://b/3045867
RL.java
RLStreamHandler.java
4b25199bc0b7a64a6feaa60e7d5d6b0474341234 21-Jan-2011 Elliott Hughes <enh@google.com> Add an @hidden Byte.toHexString that does the right thing, and use it.

Turns out most callers don't actually give a toss about case anyway, since
they're just for debugging output.

Bug: 3371169
Change-Id: Ib8dc079be2dcbf6f2415ecb9b71d034ee71f68eb
RIEncoderDecoder.java
RLEncoder.java
RLStreamHandler.java
5d0cc20dcd910199ba613d912d9dad4876152930 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am d63ca955: am 0e6ef4e7: am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit 'd63ca955dca5eaa786666e9d4d9b4e97ceb049ad':
Fix URL character bugs by adding yet another encoder.
d1b5e5da828434388e486a388710d21e4306dae0 20-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix URL character bugs by adding yet another encoder.

We don't have an encoder that ignores already escaped
characters.

Change-Id: I9ff080ad1745136b7d7313d78af2b0ca1785b200
http://b/3360947
RL.java
RLStreamHandler.java
3e16a1a4bc2e092cda4de2977157cff082682fd7 14-Jan-2011 Jesse Wilson <jessewilson@google.com> am 1c3170be: am 2d6d9bc3: am 65275e82: Merge "Fix HTTP cookie to do case mapping with Locale.US." into honeycomb

* commit '1c3170be4e2ec3b895027c848e6429062bb7c74d':
Fix HTTP cookie to do case mapping with Locale.US.
f162edaa335461474b020027bb2e85eb3be2c179 14-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix HTTP cookie to do case mapping with Locale.US.

While I'm here fix a MockWebServer bug I recently introduced
that broke cookie tests that needed to know port numbers before
responses were enqueued.

Change-Id: Idb2389ac5ed66656248c10aeb68209641acc0a68
http://b/3325637
ttpCookie.java
118abc3050371812703e4fabf03f4399d01fb28c 13-Jan-2011 Elliott Hughes <enh@google.com> Kill most users of StringTokenizer.

I've left a handful that actually make some use of it, in classes we
don't care about anyway (XML preferences and the like).

Change-Id: I754262ee600d8a16046b537a6d6258db849db89b
RI.java
RL.java
RLConnection.java
78e3320540c8bdcbefba5ae1222ee18f6679ab33 13-Jan-2011 Elliott Hughes <enh@google.com> Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid problems in Turkey.

Some callers should be replaced with equalsIgnoreCase instead.

The one exception is StreamTokenizer, where the RI uses the default
locale, which is arguably the right thing to do. No-one cares because
that's legacy API, but I've added a test anyway.

I've left HttpCookie and GeneralName for my co-conspirators because the
appropriate resolutions aren't as obvious there...

Bug: 3325637
Change-Id: Ia37a1caaa91b11763ae43e61e445adb45c30f793
efaultFileNameMap.java
ocketPermission.java
RI.java
RLClassLoader.java
RLConnection.java
0d4ce4227fa818288b8db762b640dfa21e3162f5 12-Jan-2011 Elliott Hughes <enh@google.com> Change all "final static"s to "static final".

Just so we sound like native speakers.

Change-Id: I4d98ec7519af8c1578609945ca9d480484b82874
ttpURLConnection.java
ffb5c638cb2b11a715b823550c5c28fcf54a52d2 11-Jan-2011 Elliott Hughes <enh@google.com> am 5c055cff: am e7c5643e: am a9c6c901: Documentation improvements for socket options.

* commit '5c055cfff341707ea5e5e9064580cfa7a15d480f':
Documentation improvements for socket options.
a9c6c9013b08934867f71b69a90efce0c1b66918 11-Jan-2011 Elliott Hughes <enh@google.com> Documentation improvements for socket options.

Bug: http://code.google.com/p/android/issues/detail?id=13898
Change-Id: I202a5404e7e828f074483a3f6365b4e3a941da7d
atagramSocket.java
netAddress.java
ulticastSocket.java
etworkInterface.java
erverSocket.java
ocket.java
ocketOptions.java
ocketPermission.java
1c4b8eb0aebfe7f99c10fb1d01716946e8e74ad7 07-Jan-2011 Elliott Hughes <enh@google.com> Remove @SuppressWarnings("nls") cruft.

Also rewrite a couple of toString methods for clarity.

Change-Id: Ic6e8c474ef87e0c0550eea2daed611ae41118229
ocketImpl.java
ocketPermission.java
RLConnection.java
87548e8585334658c3ee89050ec917a10ca35e5a 07-Jan-2011 Elliott Hughes <enh@google.com> More SecurityManager cleanup.

Bug: 2585285
Change-Id: Ib9c5fdadc1361d67227b6f82a774b76c53840ff0
uthenticator.java
ttpURLConnection.java
netAddress.java
RLClassLoader.java
RLConnection.java
ad41624e761bcf1af9c8008eb45187fc13983717 07-Jan-2011 Elliott Hughes <enh@google.com> Retire SecurityManager.

This change removes all the code that was calling getSecurityManager, and
removes all use of AccessController.doPrivileged. It also changes the
implementation of AccessController so it doesn't actually do anything; it's
only there for source-level compatibility.

Bug: 2585285
Change-Id: I1f0295a4f12bce0316d8073011d8593fee116f71
ddressCache.java
uthenticator.java
ookieHandler.java
atagramSocket.java
ttpURLConnection.java
netAddress.java
netSocketAddress.java
ulticastSocket.java
etPermission.java
etworkInterface.java
roxySelector.java
esponseCache.java
erverSocket.java
ocket.java
ocketPermission.java
RL.java
RLClassLoader.java
RLConnection.java
a695e8fafadd2591cd148e78f19bc6d7c15121bb 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Just use String for upper case/lower case operations.

Change-Id: If686975f659412c555684ed0032694e854e3aa8c
http://b/2183747
RL.java
9b255360071b7e07bf5ce68010b0497ff7ce61e7 13-Dec-2010 Elliott Hughes <enh@google.com> Merge "Lots more bounds-checking/exception-throwing consistency."
a1603838fe9e865575c87982e32c6343740e464c 11-Dec-2010 Elliott Hughes <enh@google.com> Lots more bounds-checking/exception-throwing consistency.

Overflow-safe checks all round, plus better detail messages. This isn't
quite everything, but it's a large chunk of the work. Most notably, this
is all of io and nio.

There are numerous changes of exception priority here, and the harmony
tests noticed a subset of them in the nio code. I've modified our checked-out
copy of the tests to accept any of the throwable exceptions.

Change-Id: Id185f1228fb9a1d5fc9494e78375b5623fb0fe14
atagramPacket.java
36c57efebc58bc840d4ce8946b56b8a29e8884b5 11-Dec-2010 Stan Chesnutt <chesnutt@google.com> Export ANY and ALL as constant InetAddress objects for use by framework
classes. ALL is newly-created in this CL.

Change-Id: I7e896a8d0ce7d897643bb2b878981e8c90760419
net4Address.java
1294cc5f777bce3fbc88e65d8c67cdf9b8d433c1 10-Dec-2010 Stan Chesnutt <chesnutt@google.com> DatagramSocket.setNetworkInterface() allows a socket to be bound to a
network interface using the SO_BINDTODEVICE socket option.

Change-Id: I9598981f0d8f633de0b591db858960b1fea2e4e8
atagramSocket.java
ocketOptions.java
b46dab348e2007bc08abaf7ecae34d89a2474e50 09-Dec-2010 Elliott Hughes <enh@google.com> Rewrite all backwards comparisons.

Strictly, all the ones I could find. This is everything with 0 or null on the
left-hand side.

Note that this touches several incorrect bounds checks, which I haven't fixed:
I'm going to come back and finish that independent cleanup separately.

Change-Id: Ibdb054b53df9aace47c7d2a00ff19122190053e8
uthenticator.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
net6Address.java
netAddress.java
arURLConnection.java
ulticastSocket.java
roxy.java
ocket.java
ocketOptions.java
1f0c4ff5de23e466032f1810172f16ad0077fa65 07-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix InetAddress tests that fail on the host.

Most of the fixes are to the tests. The InetAddress.getByAddress()
method has been changed to keep the user-reported host name.

Change-Id: I204caa5b975693144096e4ae1960682018c254d8
http://b/3238788
netAddress.java
8fd0225a5c3918fe0cd4680258388985c25533e5 06-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix some of the most obvious bugs in URLStreamHandler's URL parsing.

Change-Id: I73ce6ccc169405e993d572ac3bf3af9ba39699c9
http://b/2753295
http://code.google.com/p/android/issues/detail?id=12724
RLStreamHandler.java
5501a3d4b3d7657c183ed5446fe67fa011fbf70b 03-Dec-2010 Elliott Hughes <enh@google.com> Comments/javadoc should be in en_US, not en_CA.

Change-Id: Ie9dde4971e0a6a8dadd14af43d631158fc488cd8
RI.java
693eacca9fa67ad79d1b35dbaad61c5ac1ac457c 10-Nov-2010 Elliott Hughes <enh@google.com> Stop allocating empty arrays.

Bug: 3166662
Change-Id: I151de373b2bf53786d19824336fa434c02b0b0e8
net6Address.java
etworkInterface.java
aee3b0eced54d6cb63ceee085e12cc7ff3b02645 09-Nov-2010 Elliott Hughes <enh@google.com> Merge "Improve SocketOptions.IP_TOS documentation." into dalvik-dev
75108771bf4b7de62e05f3f6da23ff7e02f7595f 09-Nov-2010 Elliott Hughes <enh@google.com> Track Java 6 Proxy.toString change.

This fixes a harmony test.

Change-Id: Id824fe62f11b0b80ce4e266ca71cbb1a675a142e
roxy.java
70c145d9e9dd2a0244f813c217501a1b84189a43 09-Nov-2010 Elliott Hughes <enh@google.com> Apply a couple of trivial harmony patches.

These fix a couple of test failures.

Change-Id: Ifb0aef1822891069217fbedc450d8264d4f6b7c9
atagramPacket.java
atagramSocket.java
811a5c01400cf923c1827753a73297434d69fa43 09-Nov-2010 Elliott Hughes <enh@google.com> Don't eagerly resolve the hostname when doing a datagram receive.

Bug: http://code.google.com/p/android/issues/detail?id=12328
Change-Id: I850efb021b3cdcbc6c8278e9ff3cd8d34e85b1dc
netSocketAddress.java
05a0b1a0ef75b16a87f8e3490bb2b58040eb794a 06-Nov-2010 Elliott Hughes <enh@google.com> Improve SocketOptions.IP_TOS documentation.

Explain that this field covers both IPv4 and IPv6.

Bug: 3167335
Change-Id: I9541ac63281b7ee010897cb2dbd65a5fdcc7d9ca
ocketOptions.java
0d93c38cc3c7a5001aece8a18cafc6d1fc7551f3 04-Nov-2010 Elliott Hughes <enh@google.com> Add a public @hide InetAddress.isNumeric.

Some frameworks/base callers want to know whether they can call
getAllByName/getByName without incurring a DNS lookup. Rather than have them
write their own JNI to do the AI_NUMERICHOST getaddrinfo(3) call, let's just
offer them ours.

Why don't I fully expose getaddrinfo(3)? Because it doesn't map to Java API
very well, and no-one needs that yet. So for now, let's take the easy way out.

Also improve some misleading javadoc.

Bug: 3073384
Change-Id: Ia1990313306254598a4e1480cae356f68ceaaf22
atagramSocket.java
ttpCookie.java
net6Address.java
netAddress.java
etworkInterface.java
erverSocket.java
ocket.java
RI.java
0eb70e31581a977afa5df3292d1c96e42e548821 28-Oct-2010 Elliott Hughes <enh@google.com> Optimize DataInputStream and a few friends.

Also ensure that we're doing a correct readFully when reading
shorts/ints/longs.

Bug: 3032515
Change-Id: I39e6f926537f5d55063db8fc1c5a1b4b794746d4
net4Address.java
netAddress.java
fbbae9740d65620b417b85576aa0d6c7daf4ba34 28-Oct-2010 Elliott Hughes <enh@google.com> Improve UnknownHostException detail messages.

Bug: 2542766
Change-Id: I7de3c8326508294fb5d9f17f65b3f36c8fa856fa
ddressCache.java
net4Address.java
net6Address.java
netAddress.java
nterfaceAddress.java
nknownHostException.java
37dcf5581f177229ca6c8e7d0d640361640bfb00 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix ResponseCache to support caching of HTTPS responses.

Previously it would fail with an internal error because of
inconsistencies because HttpURLConnectionImpl claimed to be
'connected' when it had a cache hit, and HttpsURLConnection
acted upon this by talking to its sockets.

Change-Id: I51f4215ceb9c5fd851223a501488306fa6d382b1
http://b/3043966
esponseCache.java
492c22b53424685e8bf127964e6e12078f412bdc 23-Oct-2010 Jesse Wilson <jessewilson@google.com> am 386bfdcf: am 409630d7: am 50458469: Merge "Documenting WiFi sign in and SSL fallback with HttpURLConnection." into gingerbread

Merge commit '386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560' into dalvik-dev

* commit '386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560':
Documenting WiFi sign in and SSL fallback with HttpURLConnection.
386bfdcfd822fcb1a5ae0c0b15bacbffbdbf3560 23-Oct-2010 Jesse Wilson <jessewilson@google.com> am 409630d7: am 50458469: Merge "Documenting WiFi sign in and SSL fallback with HttpURLConnection." into gingerbread

Merge commit '409630d709ac74a8d560b173d199d272472db022'

* commit '409630d709ac74a8d560b173d199d272472db022':
Documenting WiFi sign in and SSL fallback with HttpURLConnection.
23e3c8dad87724420bad70e9e9c4e8b94a565f14 23-Oct-2010 Jesse Wilson <jessewilson@google.com> Documenting WiFi sign in and SSL fallback with HttpURLConnection.

Change-Id: Ibb0f86aefd4d4db8d1560608f62735a357da73ea
http://b/2860493
ttpURLConnection.java
ac29aad40bb1ffc25e5e66c9705cea8468021093 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Follow up on HTTP proxy selector docs.

Change-Id: Ib1e5071f112deb5129ea721836e028a26045fb91
http://b/3097518
roxySelector.java
90224a5fd4a49b519039bd29d72c0a6a06a2752b 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Rewrite ProxySelector and write a test to go with it." into dalvik-dev
3b0348d1081a4645aa38da97ee299fadc040c1b4 19-Oct-2010 Jesse Wilson <jessewilson@google.com> Rewrite ProxySelector and write a test to go with it.

http://b/3097518

Change-Id: Ic6b28ab21e00b6b55a01ae7927b87ac0d0375b44
roxySelector.java
roxySelectorImpl.java
b744a7edf23c14216698ad69ea59151e07cc50b8 13-Oct-2010 Elliott Hughes <enh@google.com> Add a hidden method to clear our Java-level DNS cache.

So the network guys can call this when the network changes, in case addresses
that were valid on that network aren't valid on the new network.

Change-Id: I07175b9b754bb4745a2f78b43f024723891c3f05
ddressCache.java
netAddress.java
a7a70410e26802f3ab480b08a1ab499338cb6f7e 03-Oct-2010 Jesse Wilson <jessewilson@google.com> Use IoUtils.closeQuietly where possible.

Change-Id: I354c1e00b7068108032d09c0a1c38e29f6283fb0
RLClassLoader.java
8e1b1ee7fe8ec6168c44a361233cbe225a16fc9d 02-Oct-2010 Elliott Hughes <enh@google.com> Make InetSocketAddress' fields final.

Also remove worse-than-useless javadoc.

Change-Id: Ib49e6fd75a253c06bbdb58c54edc637093da4d14
netSocketAddress.java
880ec6d5d26a2955734e13a09a65f57f50fb1c16 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 395f899e: am 2a275f06: Merge "Tests for ServerSocketFactory.getDefault()." into gingerbread

Merge commit '395f899e35b62795c4cf9415c13c2bf8aa02552e'

* commit '395f899e35b62795c4cf9415c13c2bf8aa02552e':
Tests for ServerSocketFactory.getDefault().
2a275f0640bf3fdbd9dd6336b4f195a5a6e9a109 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Tests for ServerSocketFactory.getDefault()." into gingerbread
4d743816cad738bfeccf6dc210fc7c9bd84a8777 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Tests for ServerSocketFactory.getDefault().

Motivated by http://b/2587385

Change-Id: If30898859f869c88342d1069a2425575752ebf6e
erverSocket.java
1542176d768492a781a96db9c3b5a84a007e3f21 29-Sep-2010 Jesse Wilson <jessewilson@google.com> am 48100926: am d33c0e52: Merge "Fix a problem where URL.equals() was returning true when both hosts couldn\'t resolve." into gingerbread

Merge commit '48100926c9278aa6ce1c0bccde5dc44cb6d0cc6e'

* commit '48100926c9278aa6ce1c0bccde5dc44cb6d0cc6e':
Fix a problem where URL.equals() was returning true when both hosts couldn't resolve.
67db542e53c47a28e3f96beb7c9e46330483dc40 29-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix a problem where URL.equals() was returning true when both hosts couldn't resolve.

See http://b/3045007

Change-Id: I83f2a0d8888dd30aaf6099049ce8008487d4337d
RLStreamHandler.java
5e23b687ef8b3c696d54d1880b454942875665b7 22-Sep-2010 Elliott Hughes <enh@google.com> Remove custom marker classes for locks.

Just use Object instead.

Bug: 3024308
Change-Id: I83a01020646d95e014743b76e27ca7134c155298
atagramSocket.java
ocket.java
793e1cdbba5545b507196bf461f691e32357a0ad 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 99b2d653: am f697be0f: am ac277be6: Handle the different definitions of \'connected\' in HttpURLConnection.

Merge commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc' into dalvik-dev

* commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc':
Handle the different definitions of 'connected' in HttpURLConnection.
99b2d6535ceaeae74887b4fc4eac674d3564dddc 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am f697be0f: am ac277be6: Handle the different definitions of \'connected\' in HttpURLConnection.

Merge commit 'f697be0f24572c8c653ce689b398bcd163960aa5'

* commit 'f697be0f24572c8c653ce689b398bcd163960aa5':
Handle the different definitions of 'connected' in HttpURLConnection.
5bc63447ee73a49de8a572a6b955af4cdc18be98 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 96c076dd: am e74b3ecc: am d4bddd7d: Fix two HTTP issues that came up when writing HttpURLConnection docs.

Merge commit '96c076ddd30d862dae69a35e1700d2befb2ee055' into dalvik-dev

* commit '96c076ddd30d862dae69a35e1700d2befb2ee055':
Fix two HTTP issues that came up when writing HttpURLConnection docs.
96c076ddd30d862dae69a35e1700d2befb2ee055 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am e74b3ecc: am d4bddd7d: Fix two HTTP issues that came up when writing HttpURLConnection docs.

Merge commit 'e74b3eccd5d2ad7809c827d3e5bcbd5fcce0f3c5'

* commit 'e74b3eccd5d2ad7809c827d3e5bcbd5fcce0f3c5':
Fix two HTTP issues that came up when writing HttpURLConnection docs.
ac277be6a146ade8f150236edf730431a7e12482 18-Sep-2010 Jesse Wilson <jessewilson@google.com> Handle the different definitions of 'connected' in HttpURLConnection.

Previously we were failing with a NullPointerException when
HTTP redirects required connecting to a different server.

The connected field means 'we can't change request parameters'.
The connection being non-null means 'we're currently connected'.

Internally, multiple connections are permitted in order to support
HTTP redirects. But in the public API only one connect() call is
permitted.

I've added a new method, makeConnection() to make the magic work.

Change-Id: Ic644d5d192ec2b1de781dc271ae149bcd1655de4
RLConnection.java
d4bddd7d1fb7b1b7f0836648228235c6e4b56a18 16-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix two HTTP issues that came up when writing HttpURLConnection docs.

We're now more careful about which headers are sent to HTTP proxies.
And getContentEncoding() is better documented.

Change-Id: I04241f99c2f32c25ba005fbd6ff9ef7236c3c9d3
ttpURLConnection.java
03878d16fe2d6e8c158d3d78b39d1774954a8bb1 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am 49d3e932: am ce457657: am 489118a5: Merge "Even more follow up to enh\'s HttpURLConnection docs review." into gingerbread

Merge commit '49d3e9326a5348ebef770874a6a6abf32ce60460' into dalvik-dev

* commit '49d3e9326a5348ebef770874a6a6abf32ce60460':
Even more follow up to enh's HttpURLConnection docs review.
49d3e9326a5348ebef770874a6a6abf32ce60460 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am ce457657: am 489118a5: Merge "Even more follow up to enh\'s HttpURLConnection docs review." into gingerbread

Merge commit 'ce4576570a87c2c3c1f30db073235f317f430038'

* commit 'ce4576570a87c2c3c1f30db073235f317f430038':
Even more follow up to enh's HttpURLConnection docs review.
11b9d26222315d4ddea223ce8f119ec25a1ba3d5 13-Sep-2010 Jesse Wilson <jessewilson@google.com> Even more follow up to enh's HttpURLConnection docs review.

Change-Id: Ia70565470d6c605d0c24105bc4ef5c712e3301a1
https://android-git.corp.google.com/g/67703
ttpURLConnection.java
7acfb05a46440d9952eda85ae16d486c980db7a9 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am c8eb9a4b: am c1741ca3: am 55bbb57d: More follow up to enh\'s HttpURLConnection docs review.

Merge commit 'c8eb9a4bdc2fd269ad6db13e00771eae839acc69' into dalvik-dev

* commit 'c8eb9a4bdc2fd269ad6db13e00771eae839acc69':
More follow up to enh's HttpURLConnection docs review.
c8eb9a4bdc2fd269ad6db13e00771eae839acc69 13-Sep-2010 Jesse Wilson <jessewilson@google.com> am c1741ca3: am 55bbb57d: More follow up to enh\'s HttpURLConnection docs review.

Merge commit 'c1741ca343b689a54c2f805b465b87177e494b78'

* commit 'c1741ca343b689a54c2f805b465b87177e494b78':
More follow up to enh's HttpURLConnection docs review.
55bbb57dc76ab0231583460f5af4083f4f48f8f5 12-Sep-2010 Jesse Wilson <jessewilson@google.com> More follow up to enh's HttpURLConnection docs review.

See the original review here:
https://android-git.corp.google.com/g/#patch,sidebyside,67584,1,luni/src/main/java/java/net/HttpURLConnection.java

Change-Id: If296b35e53e7bde88403e9124038f38dd725f83b
ttpURLConnection.java
RLConnection.java
13e721c71c83537e6f3f36ad43321c470267d3b3 12-Sep-2010 Jesse Wilson <jessewilson@google.com> am 00abf762: am 6ded10dd: am 8c283b62: Document HttpURLConnection\'s many features and misfeatures.

Merge commit '00abf762df0db66d57de813a168fb09e429f16c7' into dalvik-dev

* commit '00abf762df0db66d57de813a168fb09e429f16c7':
Document HttpURLConnection's many features and misfeatures.
00abf762df0db66d57de813a168fb09e429f16c7 12-Sep-2010 Jesse Wilson <jessewilson@google.com> am 6ded10dd: am 8c283b62: Document HttpURLConnection\'s many features and misfeatures.

Merge commit '6ded10dd27b7e46bba6b3f3491bb844f33844cf1'

* commit '6ded10dd27b7e46bba6b3f3491bb844f33844cf1':
Document HttpURLConnection's many features and misfeatures.
8c283b62cd1952ffa145332d94ed691acf4ac87e 11-Sep-2010 Jesse Wilson <jessewilson@google.com> Document HttpURLConnection's many features and misfeatures.

Change-Id: Ib6d9f05e6a23bc44bd5c8838c9e8098b15d19810
ttpURLConnection.java
01cd454055a7bef76178e301fe0d63481330676e 04-Sep-2010 Jesse Wilson <jessewilson@google.com> am bcee1dba: am e24632f5: am 4eb8ca7f: Fix the last remaining gaps in our Java 6 API.

Merge commit 'bcee1dbab816a3f32c642a7950ff824125896985' into dalvik-dev

* commit 'bcee1dbab816a3f32c642a7950ff824125896985':
Fix the last remaining gaps in our Java 6 API.
bcee1dbab816a3f32c642a7950ff824125896985 04-Sep-2010 Jesse Wilson <jessewilson@google.com> am e24632f5: am 4eb8ca7f: Fix the last remaining gaps in our Java 6 API.

Merge commit 'e24632f522e88be1a8e01ea04515fadcca45cdb0'

* commit 'e24632f522e88be1a8e01ea04515fadcca45cdb0':
Fix the last remaining gaps in our Java 6 API.
4eb8ca7f1e5de2d208c5fcee8b11a7e50200cf17 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix the last remaining gaps in our Java 6 API.

This updates Policy and adds PolicySpi. Both come right from
Harmony and have been tested by Harmony's test suite.

This removes redundant abstract methods in SocketImpl; these are
inherited from the SocketOptions interface.

This makes an internal method in SocketPermission private.

See http://b/issue?id=2497395

Change-Id: I734529ac7e1980453acfe0d8e7209f49b6679652
ocketImpl.java
ocketPermission.java
9297c39c474c98b7aec19e22bf93416071080f3a 02-Sep-2010 Elliott Hughes <enh@google.com> am 1f6597dc: am ff59a5c5: am 171dc20a: Use idiomatic Java "type[] id" syntax instead of "type id[]".

Merge commit '1f6597dc2b3340c5eca6f16d8681058f913d8744' into dalvik-dev

* commit '1f6597dc2b3340c5eca6f16d8681058f913d8744':
Use idiomatic Java "type[] id" syntax instead of "type id[]".
1f6597dc2b3340c5eca6f16d8681058f913d8744 02-Sep-2010 Elliott Hughes <enh@google.com> am ff59a5c5: am 171dc20a: Use idiomatic Java "type[] id" syntax instead of "type id[]".

Merge commit 'ff59a5c5b0977ba11442422b0a853452dfb289e8'

* commit 'ff59a5c5b0977ba11442422b0a853452dfb289e8':
Use idiomatic Java "type[] id" syntax instead of "type id[]".
171dc20afe5071d5cbfad7103903bfa2c1f8d00f 02-Sep-2010 Elliott Hughes <enh@google.com> Use idiomatic Java "type[] id" syntax instead of "type id[]".

I've left xalan and the other xml filth alone, as usual.

Change-Id: I6be274501fff73e67ca6b3c872704988e0e30486
net6Address.java
netAddress.java
RLDecoder.java
7ab77235d8e82fed639eebbf93ac317ee9346498 02-Sep-2010 Brian Carlstrom <bdc@google.com> am 9cbb0f7a: am 7f0c06f7: Don\'t use StringBuffer where we don\'t need to.

Merge commit '9cbb0f7a0022b823d664c8c20daecf2de584aecb'

* commit '9cbb0f7a0022b823d664c8c20daecf2de584aecb':
Don't use StringBuffer where we don't need to.
7f0c06f737b6f1f6b3a5bb30111f95dd0ca586a2 02-Sep-2010 Brian Carlstrom <bdc@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: Ibf7b2b5e347196d4de857217b022003ccc409ac5
RLEncoder.java
b535fdb2c252e7a88cb6de46ccb479a5e9b70cf6 02-Sep-2010 Elliott Hughes <enh@google.com> am 1da033c1: am b74f4fca: am 95c82c8a: Fix "java.net.preferIPv6Addresses".

Merge commit '1da033c1c02b821561f1e372a6832d388e2188c0' into dalvik-dev

* commit '1da033c1c02b821561f1e372a6832d388e2188c0':
Fix "java.net.preferIPv6Addresses".
1da033c1c02b821561f1e372a6832d388e2188c0 02-Sep-2010 Elliott Hughes <enh@google.com> am b74f4fca: am 95c82c8a: Fix "java.net.preferIPv6Addresses".

Merge commit 'b74f4fca74714f96fc8e1fb467ac835d33eb78eb'

* commit 'b74f4fca74714f96fc8e1fb467ac835d33eb78eb':
Fix "java.net.preferIPv6Addresses".
95c82c8a020e48793dd5db33ba1a20f9ef01737a 02-Sep-2010 Elliott Hughes <enh@google.com> Fix "java.net.preferIPv6Addresses".

I wrote getBoolean (a bogus method that shouldn't even exist) when I meant
parseBoolean.

Change-Id: Ib8c1cefdf0242fdc2b613850ec88ca35a1a83dea
netAddress.java
328f533a177f7579a9ea916f5569053ec9c149b8 01-Sep-2010 Elliott Hughes <enh@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: I47e80399ebced922656e46dacd8dcbfc698e94f8
RLEncoder.java
3db0d1b07a79c3c871b0aa0929674adae3081b4f 28-Aug-2010 Elliott Hughes <enh@google.com> Remove the accessors hiding our IFileSystem and INetworkSystem.

These accessors aren't buying us anything, are costing us something, and have
encouraged caching of instances in fields all over the place. Lose all that
cruft.

I think we all agree that we want to merge IFileSystem and INetworkSystem at
some point, but I'll do that some other day.

Change-Id: I07696ec9650d0395ec31a71a74300e818a3fed91
atagramSocketImpl.java
netAddress.java
ocket.java
ocketImpl.java
RI.java
172d4583c8ad2a2121bcb8315fa1cc317cd7ff04 26-Aug-2010 Ben Dodson <bjdodson@google.com> Merge "Update for changes to @code processing"
1d58625189328f29c10fa98d52512ee6cf8cc641 26-Aug-2010 Ben Dodson <bjdodson@google.com> Update for changes to @code processing

Change-Id: Ifb7dbe3105bdef15dadb84740845a71b019d62e3
ocketPermission.java
125f068f0a6cd739beac97821c9421cf8317cc87 20-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix a bug when user sets "Content-Encoding: chunked" manually.

We used to try to build a -1-sized ByteArrayOutputStream, which
failed miserably with an exception.

Change-Id: Ia6fa72c639a14c03f03b6f73083ce37ffab8b4e5
ttpURLConnection.java
29183729e5671a819d5f735969c7772804457b9f 19-Aug-2010 Elliott Hughes <enh@google.com> Minor net cleanup.

Move two constants to where they belong, and fix a well-intentioned but broken
detail message (confusion between two locals: an InetSocketAddress and its
InetAddress --- when the latter is null, we want to print the former).

Change-Id: Ic6a29edb31c0cde11f03ec511a3a9a864fec957f
net4Address.java
net6Address.java
netAddress.java
ulticastSocket.java
0b29a1fecc601de2f642ded891726ac3e460d74b 18-Aug-2010 Elliott Hughes <enh@google.com> Multicast cleanup.

This doesn't fix any bugs, but it does get rid of a lot of code. This is how
Stevens' book tells us we should be doing things.

Bug: 1610553
Change-Id: I00a79a6c34084ba018fb69c7f1123300a2698ce9
atagramSocketImpl.java
ulticastGroupRequest.java
ulticastSocket.java
a92f883cda9e483c64f78dbba0031e6e43cd00ab 12-Aug-2010 Elliott Hughes <enh@google.com> Replace createDatagramSocket and createStreamSocket with one call.

(Continuing our policy of having native methods' names correspond to the
underlying syscall, this one sadly gets the ugly name of "socket".)

Change-Id: Icf08e4e0637ee3ae9eab673d350860181f547250
netAddress.java
0917c4a9d5d0115950450cdd0bb46e43a48da5db 12-Aug-2010 Elliott Hughes <enh@google.com> Clean up some dead/useless code.

(The DatagramPacketTest.java change is unrelated, but it's been lurking in my
repository for weeks now.)

Change-Id: I65d3ad53dd30709b2daed3c5787cc38c6081ffea
netAddress.java
ulticastSocket.java
ocket.java
ocketPermission.java
7365de1056414750d0a7d1fdd26025fd247f0d04 12-Aug-2010 Jesse Wilson <jessewilson@google.com> Sorting imports.

Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
ddressCache.java
atagramSocket.java
atagramSocketImpl.java
net6Address.java
netAddress.java
etworkInterface.java
roxySelectorImpl.java
ecureCacheResponse.java
erverSocket.java
ocket.java
036ffc75d2b7ece42bcd97f290c026e215868ba9 05-Aug-2010 Elliott Hughes <enh@google.com> Rationalize and simplify our "connect" implementations.

We don't need to copy a context structure back and forth between native code
and Java: it didn't contain anything but temporaries anyway. We don't need a
convenience method for a blocking connect with no timeout. We don't need a
separate codepath for datagram and stream sockets' connect calls.

There are further simplifications that could be made, I think. I think we
could implement "connect" in Java in terms of "connectNonBlocking" and
"isConnected" (since that's how our native implementation works anyway).
I also think we can fix the 100ms polling too, though I haven't investigated
and that may require that we fix the general "interrupt on close" problem.

Change-Id: Ib5989fa05f5dd7dd24b681fab70f856cd0bc5c56
netAddress.java
f4f96a70ae784447d1657a7d56fa73eee1ccb3f2 03-Aug-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 7b3ebefc to dalvik-dev

Change-Id: I7bb0341107f0b3f5b568d151f062e30f61e5ee14
7b3ebefcdf79a251cf2a5619dd2354952fc67665 02-Aug-2010 Elliott Hughes <enh@google.com> Use the existing mime-type/extension mapping from frameworks/base.

(An accompanying change to frameworks/base switches that over so that both
android.webkit.MimeTypeMap and java.net.URLConnection use the same data.)

Bug: 2422917
Bug: http://code.google.com/p/android/issues/detail?id=10100
Change-Id: I37f008a00093efcf7b336ea0c206e8977544b0bf
efaultFileNameMap.java
ileNameMap.java
RLConnection.java
4fe378672d700aaae3a50db956b693b3ed599c7d 31-Jul-2010 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv4Stack" (which has been broken >= eclair).

Change-Id: I4733a0e266ff7c02c25033e79bcceff4d7357868
netAddress.java
ulticastSocket.java
e7cdf919cf8bbb971eede72cd89168da11e38f82 30-Jul-2010 Elliott Hughes <enh@google.com> Merge "Fix setTrafficClass." into dalvik-dev
2cd82d7111f68ff63145ef7c393bf1479ff06223 29-Jul-2010 Elliott Hughes <enh@google.com> Fix setTrafficClass.

Pass the traffic class setting down to the kernel, rather than trying to
fake it in Java and then not actually using it at all in the native code.

There are two ways to set traffic class (aka type of service, or TOS):
per-packet or per-socket. The Java API is for the per-socket style, but
the old implementation had each SocketImpl intercept calls to
SocketOptions.setOption for SocketOptions.IP_TOS, stash the traffic class
in one of the SocketImpl's private fields, skip calling native code, and
then pass the traffic class to each native method that would need it to
implement the per-packet style. Unfortunately, each of those methods was
just ignoring the traffic class.

I've removed all this interception, so we now pass the traffic class straight
to the kernel via setsockopt(2), and we don't need to pass anything to the
individual per-packet calls.

The motivation for going the per-packet route appears to have been to work
around a lack of support for the per-socket route in old versions of Linux
and other OSes. It all works now, though, so there's no point making our
lives harder (and doing more work at runtime) to work around bugs and
infelicities that no longer exist.

I tested the new code manually with tcpdump, for both IPv4 (radio) and
IPv6 (wifi), and in both cases it looks like it's doing the right thing now.
We also still pass all of our tests, though none of them are capable of
recognizing whether we're actually doing anything useful anyway...

Change-Id: Ice241e088d25037123c73733a3f2bfade976fb31
atagramSocket.java
netAddress.java
ocket.java
ocketImpl.java
ocketOptions.java
b0b73fa970581e7aa8735c0c388c4363cf8da07b 29-Jul-2010 Ben Dodson <bjdodson@google.com> Fix for poorly compiling documentation

Change-Id: I6077052df3cf6ba1f977aa312552ef8fe43bd56c
ttpCookie.java
0371d85fa3ecb5f162d107cdbff0a99cd987fdcc 27-Jul-2010 Elliott Hughes <enh@google.com> Fix setSoLinger.

The bizarre use of Boolean or Integer (rather than just using -1) comes
from the RI. Third-party SocketImpl implementations may expect the RI's
documented behavior, so we should probably do the same.

I've also changed SocketChannelImpl.SocketAdapter to reuse Socket's
implementation of all the socket option getting/setting code, mainly so
we don't have two copies of all the weirdness.

I've also fixed a bug in the native getSocketOption code which returned
a Boolean rather than an Integer for IP_TOS/IPV6_TCLASS, though that code
is actually never called at the moment.

I've removed support for passing Byte values to setSocketOption. The RI
only uses Boolean and Integer.

Change-Id: I80ba63745f4c4f3ac357dc3f0b7cbf254a291bce
atagramSocket.java
ulticastSocket.java
erverSocket.java
ocket.java
ocketOptions.java
ocketUtils.java
06f47d3e721e7032c97f80b3b2c7d25a8e6f2d21 29-Jul-2010 Brian Carlstrom <bdc@google.com> Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Change-Id: I9687c2ef06dc2bd1ba573bf40ec00236c25e558f
4e4000ed98f9056639fba0713a3fd3caacf9746c 27-Jul-2010 Elliott Hughes <enh@google.com> Let the kernel handle network timeouts by setting SO_RCVTIMEO.

As far as I can tell, the reason other implementations use select(2)
instead of SO_RCVTIMEO is that traditionally the latter wasn't implemented.
Stevens is unusually unspecific about the portability of SO_RCVTIMEO, but
the web says that Linux didn't support it until 2.4, and Solaris was late
and buggy too. Modern versions of Linux, Mac OS, and Windows all support
SO_RCVTIMEO, though, so portability should not be a concern for us.

This patch causes a regression; several of the blocking network I/O methods
that used to be interruptible by virtue of their select(2)-based manual
implementation of timeouts are no longer interruptible. Making all network
I/O interruptible is work in progress, covered by http://b/2823977.

Bug: http://b/2512069
Change-Id: I0a2812ca1537bd171c4205343d6b3b526b72b2b2
atagramSocket.java
erverSocket.java
ocket.java
ocketImpl.java
ocketOptions.java
221d0ccb4cc23ee0bf0646e9abe471fb48b3a1a8 15-Jul-2010 Elliott Hughes <enh@google.com> Simplify the network send(2) interfaces.

Similar to the change for the recv(2) code.

Unrelatedly, I've pulled out our exception-throwing helpers for reuse. This
was meant to be in a separate change, but I accidentally mixed it in.

Bug: 2823977
Change-Id: I314a4337189277b6eff65f7ccf9e897b5d0b73f2
ocketImpl.java
06a62bfda6aa4919d92a505ede4c8cd247fe15ba 15-Jul-2010 Elliott Hughes <enh@google.com> Match the RI in the exception thrown by DatagramPacket's constructor.

We were failing an existing harmony test, so no new test necessary.

Change-Id: I056187225af52a2bc927da208f9d174f3249b5fa
atagramPacket.java
79ff4e73fd689dae6667a8137ee57137962ff13a 14-Jul-2010 Elliott Hughes <enh@google.com> Make it possible to interrupt network reads.

This patch simplifies the network I/O interface, in particular for read/recv.

The bounds checking from OSNetworkSystem.read goes, since the caller already
checks. (If we want that checking in native code, we should add it uniformly.)

We also remove supportsUrgentData (which was always returning true), and remove
the sole caller, so we just try the operation and report failures if they happen
rather than trying to predict the failure (as the original code seemed to want
to do, and which is never a good idea).

The native code gains logic to recognize when the FileDescriptor has been
closed from another thread, though this logic remains largely unused at this
point. (There's comment-out code in "close" that does a shutdown(2) to wake
us up so we can recognize this situation.) I've switched code over to using
the new NetFd class, but haven't ensured that we handle the wakeups correctly.
(The "read" implementation being the notable exception.) For now, with the
shutdown(2) commented out, this shouldn't have any visible behavioral changes.
(And our tests don't spot any.)

Code that was using malloc(3)/free(3) to allocate temporary buffers, and copying
to and from those buffers has been rewritten to use JNI-provided pointers onto
the heap, as part of the general "don't lie to the garbage collector" push.

The implementations for the various old forms of recv have been collapsed into
one.

Bug: 2823977
Change-Id: I05cf742c44827a24df3c1ff59727013ee4636233
netAddress.java
ocket.java
3bf03b8be207d0c760bcad5eae5028e854498376 14-Jul-2010 Elliott Hughes <enh@google.com> Remove the last few "Answer"/"Answers" from javadoc.

Change-Id: I753bd9bbfc1462d948929197f00668fa1e1237f2
erverSocket.java
a5df574bf93265d41986b7e5474fb2fbb527c9f0 14-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Cleanup HTTP retries." into dalvik-dev
c0372d90016d241ac979faa6fa1731f30b6f2a03 13-Jul-2010 Jesse Wilson <jessewilson@google.com> Cleanup HTTP retries.

We now do the right thing when redirects point us at a different
host or a different scheme.

Also...

Invert the parameter to AbstractHttpInputStream.endOfInput()
and HttpURLConnection.releaseSocket() to be positive 'reuse'
rather than negative 'close'. It makes the code in that method
read better.

Combine discardResponse() and endRequest(). The new method is
discardIntermediateResponse(). Cleanup how we handle intermediate
responses, and how those connections get recycled.

Remove HttpURLConnection's cached fields for proxy addresses.
Instead just update the proxy field when those fields change.
This attempts to make it clear that the names represent the
connected address and not the origin server's address. (This
is different when a proxy is in use.)

Document a consistent interpretation of the inherited protected
field 'connected'. Unfortunately it does not mean connected.

Change-Id: I8d4b65bffa5aeba353186b60cf951232f7762a18
netSocketAddress.java
ccbe3404e0691dab506d017550658e8e5974c83e 10-Jul-2010 Elliott Hughes <enh@google.com> Use 'dst' (or an even more appropriate name where possible) rather than 'dest'.

(The ArrayIndexOutOfBoundsException for System.arraycopy already talks
about 'dst' and 'dstPos'.)

Change-Id: Iba9415dd4a9ec3b457938ea4469b4a0024bab6e4
netAddress.java
da289bcd0a9e207cc03c752f7c21c9004056e179 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Address feedback from change 57066,
Rewrite the main request retry loop of HttpURLConnection.

Change-Id: I7e10e356614970971253f2e3f60d173a2e5433d4
ttpURLConnection.java
ffd579b668428272b78f5c6c64f9c89766f37c1a 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Rewrite the main request retry loop of HttpURLConnection.

We had problems where HTTP auth failures weren't eligible
for automatic retries, particularly when HTTP post was
in use.

This fixes that problem and generally cleans up the HTTP
request loop. In particular:
- Be more careful about keeping state about whether
we've sent a request or a request header.
- Document the nuanced behavior around when headers are
transmitted.
- Simplify the daisy-chain of methods. Formerly we had
sendReqeust, writeRequest, doRequest, and doRequestInternal.
We now have more intention-revealing method names.
- Manage reentrant calls to doRequest(). Previously weird
things would happen, such as the following chain of calls:
doRequest()
doRequestInternal()
sendRequest()
readServerResponse()
maybeCache()
ResponseCache.put()
getHeaders()
doRequest()
Things are now more straight forward and retrieveResponse()
initializes everything.
- Throw HttpRetryException when we should.

Also moving inner HttpOutputStreams into their own classes and
splitting DefaultHttpOutputStream into ChunkedOutputStream and
RetryableOutputStream.

Change-Id: I5c1da717f0dee7ecc896e51701b702e535867417
ttpURLConnection.java
21557bb6a8f35a2f9889adba449cac950c9d41b9 23-Jun-2010 Elliott Hughes <enh@google.com> Add TimeZones.forLocale, plus some tidying.

The new feature here is TimeZones.forLocale and the accompanying JNI. I've also
taken the liberty of pulling the time zone stuff out of ICU.java and ICU.cpp,
and I've moved some of the ICU-related code I've written recently (NativeIDN,
NativeNormalizer, and NativePluralRules) into a new libcore.icu package.

I've also renamed various things so the implementation details use the same
terminology as the thing they're implementing.

Bug: 2790386
Change-Id: Ie39a2f5f7023e8e29864de15790be8a660f5cba6
DN.java
e32b21f14d52bac429a9c54fe031f9e92c911d64 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Implementing ZoneInfo.hasSameRules().

Moving TimeZoneTest to OldTimeZoneTest and removing test methods
that are duplicated between libcore and Harmony.

Also adding Objects.equals() to make implementing this easy,
and removing redundant time zone tests. I did a few searches
to find candidate code that could take advantage of this new
utility method and adopted it there.

Change-Id: I133298f1b36d755bd35c1ad0dc0ab366fd164270
ttpCookie.java
RLStreamHandler.java
a2952462d8f654b2e0ccfac4a1f2d54aa0259516 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing various problems with HTTPS proxies thru HTTP." into dalvik-dev
776982b51c97692b1fab09828057d2f2516f50b9 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am 32a84bfe: am 65bfb219: am 7983be97: Sprinkle BlockGuard checks on DNS lookups.

Merge commit '32a84bfee7611f4553de46465a7fc00ecff99b81' into dalvik-dev

* commit '32a84bfee7611f4553de46465a7fc00ecff99b81':
Sprinkle BlockGuard checks on DNS lookups.
32a84bfee7611f4553de46465a7fc00ecff99b81 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am 65bfb219: am 7983be97: Sprinkle BlockGuard checks on DNS lookups.

Merge commit '65bfb2194248a27d8bf35b39c9d0e234fd329d7d'

* commit '65bfb2194248a27d8bf35b39c9d0e234fd329d7d':
Sprinkle BlockGuard checks on DNS lookups.
7983be972905950b4a4e7d66df908f083c81ee29 16-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Sprinkle BlockGuard checks on DNS lookups.

Change-Id: Ib1ac2ce633fc1277ab8b6f11da37a739d0995cfe
netAddress.java
c8977f474b30c5f3807398859a6b16687af6fc7b 15-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing various problems with HTTPS proxies thru HTTP.

- reading extra bytes from the server depending on available()
- not sending the port with the proxy request
- returning a read-til-the-end stream instead of a read-0-bytes-stream
on CONNECT requests
- fixing MockWebServer to omit the unnecessary \r\n after
the response body
- tests no longer mask the issue by unambiguously reading characters.
Trailing newlines aren't discarded!
- New tests when content-length and content disagree. The RI fails
the test when the transfer-encoding is not chunked.

Change-Id: I888569844d323bc770cd5bb95ac71c740dd5e720
ttpURLConnection.java
RI.java
RL.java
e810d3b49631329b11440aa5b7a54db181d42ed1 15-Jun-2010 Elliott Hughes <enh@google.com> More charset-related cleanup/optimization.

This patch adds a Charsets class that lets us avoid a hash lookup and an extra
level of method call indirection when calling String.getBytes or "new String"
for a well-known guaranteed charset. It also fixes callers to take advantage.

This also adds a special case to "new String" for the UTF-8 charset to avoid
needless duplication if we guessed the correct buffer size (which we will for
input that happens to be US-ASCII too).

The ModifiedUtf8 class gives a more meaningful name for Utils.convertUTF8WithBuf.

This also removes a dead link and un-tinyurl'ed another.

Change-Id: I02712f53dee16feb3b1db2c14536dc055126cd04
RIEncoderDecoder.java
RLConnection.java
73113fb0d6ab5708b284913431b22ec93d335521 09-Jun-2010 Elliott Hughes <enh@google.com> Remove a duplicate of Charset.defaultCharset (from a deprecated method).

Change-Id: Ia7be1cfb2f7c3e891cd421fea4f814e62a1bc283
RLDecoder.java
42c2d693868179248e907ad864f2b8840945e95a 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing file leaks in SelectorImpl." into dalvik-dev
6b739231f8985f33f20672fe727fde0d0f023ead 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing file leaks in SelectorImpl.

There were two core problems:
source.close() and sink.close() weren't being called by SelectorImpl
ServerSocketChannelImpl was opening a stream socket into a file descriptor,
only to have its PlainServerSocketImpl clobber that file descriptor later
when create() was called.

Alongside fixing these problems I've done some style cleanup. None
of which should impact behavior.

Change-Id: I39eead3fbdc0290e83784e8b50861aeef7020513
ocketImpl.java
753dcd862b31e85766225590d90ba0b9f481176f 02-Jun-2010 Elliott Hughes <enh@google.com> Refactor some of the OSNetworkSystem stuff to more appropriate homes.

Also rewrite PlainDatagramSocketImpl.peek in terms of existing primitives
rather than requiring its own. I still don't see how it can get called, but
at least now it doesn't require its own native code.

Bug: 2686833

Change-Id: I0453add66dab4c7095ee2a3f51a49efbd1205598
netAddress.java
RI.java
82317aca10195366fe67b70b0d10554a8886e183 28-May-2010 Elliott Hughes <enh@google.com> Merge "Javadoc improvements." into dalvik-dev
4adff24306c86433ce4f771da8489a574e63318e 27-May-2010 Elliott Hughes <enh@google.com> Javadoc improvements.

Bug: 2718660
Change-Id: Ifae8541d269ac0fa5581802a8d78453af19a0e10
net4Address.java
net6Address.java
netAddress.java
04a837d3657716ea4e618194f4e8771554caec46 27-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing many test failures with the new cookie implementation." into dalvik-dev
6e5d43fafa5d4fa75cefa8e552c6c1c60a5d3534 27-May-2010 Jesse Wilson <jessewilson@google.com> Fixing many test failures with the new cookie implementation.

Highlights:
- don't send cookies with nonmatching ports or secure attributes
- default the port when "port" with no value is received
- make CookieStore threadsafe
- make CookieStore retain only host in URIs
- fix concurrent mod bug when removing expired cookies
- support null URIs in the CookieStore (unfortuantely)
- parse more date formats; even ridiculous date formats
- match ".google.com" to "google".
- support single quotes in attribute values
- exploit @hide to add a new API, URI.getEffectivePort()

Alongside this change I've fixed several test problems in dalvik-prebuild's
copy of both the Harmony tests and the jtreg tests. Most of the fixes involve
commenting out bogus assertions.

Change-Id: I71f09110b48d8ca4f3538fd21c8dde7ffdd35a6a
ookieManager.java
ookieStore.java
ookieStoreImpl.java
ttpCookie.java
RI.java
162a12c1442641a95fe95859fa4e561b22db049f 25-May-2010 Elliott Hughes <enh@google.com> Remove @hide from Java 6 API.

I've left the two new spi packages @hidden, because I think we shouldn't
support them without convincing demand from developers (and I don't
believe there could be such a thing --- they just don't make sense, and
if we add anything, it should be the ability to provide extra ICU data).

Also fix a handful of javadoc syntax errors in Arrays.java and TreeMap.java.

Bug: 2497395
Change-Id: I4176b72daff0face4ed6c7ee1d1f4267d52006b4
DN.java
nterfaceAddress.java
etworkInterface.java
a4a1f1ce70da1dd3a4ddf0b962b669cb78a63000 25-May-2010 Elliott Hughes <enh@google.com> Merge "Remove the luni localized exception messages." into dalvik-dev
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
ookieStoreImpl.java
atagramPacket.java
atagramSocket.java
ttpURLConnection.java
net6Address.java
ulticastSocket.java
etworkInterface.java
roxy.java
roxySelectorImpl.java
erverSocket.java
ocket.java
ocketImpl.java
ocketPermission.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLStreamHandler.java
1ca3a957ea02c279214b668925e0b61e618da606 25-May-2010 Jesse Wilson <jessewilson@google.com> Reduce the visibility of HttpCookie.isFullyQualifiedDomainName().

This is a genuine bug caught by apicheck. Yay apicheck.

Change-Id: I8f9cb60d42d7cba1b65b3173660ef51cd8427622
ttpCookie.java
3fab88eb2cd44ee5231b05f63e20917d3db12079 25-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Redo HttpCookie.parse()." into dalvik-dev
77160e9cd7841fcf49d20b97a75d60e827c351ee 21-May-2010 Jesse Wilson <jessewilson@google.com> Redo HttpCookie.parse().

The previous code failed on quoted strings like ;Port="80,8080".
It also had weird behavior, like not supporting Expires headers
when the requesting locale wasn't English.

Tested with Harmony's tests and our CookieTest.

Change-Id: I271817b6febd30248f55f834cdcc2e3d5dfcd4c2
ookieManager.java
ttpCookie.java
netAddress.java
80a7fbab52b96c9fd47c72f8987d1babe2cd001d 22-May-2010 Elliott Hughes <enh@google.com> Remove more localized exception messages.

I also accidentally mixed two unrelated changes in here: replacing "".equals
and equals("") with String.isEmpty, and removing some dead code in
org.apache.harmony.luni.util.Util.

Change-Id: I0aaad43290b083085b3095b624caf096de487223
etworkInterface.java
roxySelectorImpl.java
ocketPermission.java
RI.java
RL.java
RLClassLoader.java
RLStreamHandler.java
b64216b26ade0c4da110590b7a7c5fabcbb3f021 15-May-2010 Elliott Hughes <enh@google.com> Remove dead code.

Change-Id: Ib9732c712a50a3bc9ed186464586a0f407e27287
ulticastSocket.java
ocket.java
8cc54e9f098c4f299d2b88bb2b9110ce44354ed7 14-May-2010 Elliott Hughes <enh@google.com> Fix getInetAddress/getPort/getLocalAddress/getLocalPort.

Responsibility is split between Socket, SocketImpl, PlainSocketImpl,
SocketChannel, SocketChannelImpl, and SocketChannelImpl.SocketAdapter, and
we need to keep them synchronized. Our hands are somewhat tied by the fact
that the RI exposed way too much. I think, now I understand the relationships
a bit better, that we can probably rewrite this cluster of classes to be
simpler, but I don't want to bite off more than I can chew right now, and
this does fix the known problems.

This patch also makes us more compatible with the RI by making getLocalAddress
after the socket has been closed return the address we used.

By strange coincidence, harmony addressed this at the same time I was looking
at it (see http://svn.apache.org/viewvc?rev=944119&view=rev) but I feel they're
going in the wrong direction and making the relationships even more complicated.
I have run their new tests in addition to my own, though.

Bug: 1952042
Bug: http://code.google.com/p/android/issues/detail?id=1933
Bug: http://code.google.com/p/android/issues/detail?id=3123
Change-Id: Icb7793fb5d868e0d1f1b8b3d5da88c32fb973744
ocket.java
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
ddressCache.java
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
ontentHandlerFactory.java
ookieHandler.java
ookieManager.java
ookieStoreImpl.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpCookie.java
ttpRetryException.java
ttpURLConnection.java
DN.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketException.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
d21d78fd49a2d798218e8c8aefbddb26a0e71bbb 13-May-2010 Elliott Hughes <enh@google.com> Convert tabs to spaces.

Change-Id: I16cfbd2faac6b565b78b5dd97e2345323a36f652
RL.java
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
uthenticator.java
ookieHandler.java
ookieManager.java
ookieStoreImpl.java
atagramPacket.java
atagramSocket.java
ttpCookie.java
ttpURLConnection.java
net4Address.java
net6Address.java
netSocketAddress.java
arURLConnection.java
ulticastSocket.java
etworkInterface.java
roxy.java
roxySelector.java
roxySelectorImpl.java
erverSocket.java
ocket.java
ocketImpl.java
ocketPermission.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
0b2836e81d354e9bb7df9d43cda5ccfb9c199450 12-May-2010 Elliott Hughes <enh@google.com> Apply http://svn.apache.org/viewvc?rev=936696&view=rev.

Change-Id: I24080d57d69d7763f67def2ec5c06583beda6c59
RLConnection.java
5f37da05bb48298568f8abd7c97c3d11552e1867 11-May-2010 Elliott Hughes <enh@google.com> Documentation improvements.

Remove a bunch of content-free "package.html" files, and rewrite the Pattern
documentation.

Change-Id: Ieb4eee940dbbeab21828b8d7b2f172732f9dd6de
ackage.html
edc2dae4345ea305f092ade00419685d77c8eee9 08-May-2010 Elliott Hughes <enh@google.com> Trivia.

Remove unused parameters from NetworkInterface's native methods.

Remove commented-out static initializers.

Fix FileChannel.force so that force(true) doesn't do _less_ than force(false).
Note that force(true) still doesn't do _more_ than force(false) because bionic
doesn't implement fdatasync(2). I've raised a bug against bionic about that.

Change-Id: Ia5e827638606a7919e3bcf324810747ee6bcbb9a
atagramSocket.java
etworkInterface.java
erverSocket.java
ocket.java
eeefcae2980c8db05ec08303b5b112afce232d26 06-May-2010 Elliott Hughes <enh@google.com> Remove the "Answers" javadoc barbarism.

I didn't realize how little of it was left, or I'd have done this earlier.

Change-Id: Ic4c23c3779bbee0ed4a8117584c5332e04536b5d
ttpCookie.java
6247987eb505a482a67f5f19678260d9e7240a5f 05-May-2010 Elliott Hughes <enh@google.com> Fix HttpURLConnection to not cache failures.

Found while investigating http://code.google.com/p/android/issues/detail?id=7787,
which turned out to be caused by unclear documentation. I've improved the
documentation somewhat, and stopped offering failed responses to the cache.

Bug: http://code.google.com/p/android/issues/detail?id=7787
Change-Id: Iec69769344af92345392c7ced817b0c823963524
acheResponse.java
esponseCache.java
RLConnection.java
4cb7f05dc68abb23ae54a5891c369062185f2210 04-May-2010 Elliott Hughes <enh@google.com> Remove an unused field and tidy up a test.

Change-Id: I23fdfe9b0470f8e1f1744660457542a999a13054
ulticastSocket.java
d138a32a96aef19d6ae3bd7ead3fbfef1a5f8217 29-Apr-2010 Jesse Wilson <jessewilson@google.com> Adding public API for cookies.

We still need to wire this into the HTTP connection classes.
http://b/issue?id=1608781
ookieManager.java
ookiePolicy.java
ookieStore.java
ookieStoreImpl.java
ttpCookie.java
38607710cdc82cb1a0e81c2fc5c78278b435e4fc 23-Apr-2010 Jesse Wilson <jessewilson@google.com> Remove unnecessary IPv6 and IPv4 parsing from URI.

Cleanup URI and InetAddress exception localization.
netAddress.java
RI.java
RLClassLoader.java
733642b27de051f9fabcd689d160282971a30cef 22-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing java.lang.NullPointerException at java.net.URI$Helper.isValidDomainName

See http://b/issue?id=2604061
RI.java
79179d5284bdc6854d1366226d26eec8b766d1ac 01-Apr-2010 Elliott Hughes <enh@google.com> Add Java 6's java.net.IDN.

harmony's tests and my code, though ICU4C does all the hard work.

I've added a test of my own to demonstrate some weird RI behavior (that I've
emulated in our implementation).

Bug: 2497395
Change-Id: I8146f72a8a3204449ee3d0d9065dadc1c1c77fcc
DN.java
97144c87ada735a82221d7cdf65555b8f063a05a 30-Mar-2010 Elliott Hughes <enh@google.com> Trivial tidying up of networking code.

Removing cruft and renaming things.

Change-Id: I317726c40a1addf3a1ad9d905239438424082549
netAddress.java
6edeab307d95e5ef0610889ab3ef68e16e0b0510 24-Mar-2010 Elliott Hughes <enh@google.com> Merge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev
81e3c1d7a6ff5b1f6a587890249e1cb1b3beccc7 24-Mar-2010 Elliott Hughes <enh@google.com> am b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."

Merge commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2' into dalvik-dev

* commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2':
Improve java.net.InetAddress.getLocalHost documentation.
b748a9b827665a8b19d60af4b419503b45e74329 24-Mar-2010 Elliott Hughes <enh@google.com> Remove explicit 8192 arguments to BufferedReader and friends.

These were clearly added just to shut up our own warning, and are now
unnecessary and misleading to future maintainers.

There's one barely-related change: InputStreamReader and OutputStreamWriter
are very similar, and this patch makes them more similar, and adds a few
missing modifiers from their fields.

Change-Id: I959011f914ff215e92bbfa41c1bac66465803685
roxySelectorImpl.java
ce64852f32d7d10ebd61a9c8f9ba2e91068f9bd2 23-Mar-2010 Elliott Hughes <enh@google.com> Improve java.net.InetAddress.getLocalHost documentation.

Bug: 1518707
Change-Id: I741a7a28325320949e84e997e6a49d3356c9a308
netAddress.java
d1c610c2a641157df80aa8aefefc49393074f507 22-Mar-2010 Elliott Hughes <enh@google.com> Remove all remaining "@since Android" tags.

I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.

Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
ackage.html
d9d263010b4b3fb039ecb88bddbc565414d82c63 16-Mar-2010 Elliott Hughes <enh@google.com> Remove dead fields, constants, and redundant pass-through methods.

(This is just preliminary to what I really want to do, which is vastly
reduce the number of near-duplicate methods we have: all the send/recv
variants, for example.)

Change-Id: Ib03653820a18f55aea6c5b876c397afd281a98dc
ocket.java
f1072c37db1f647ab6bbbb9b866b699ef1e19ec3 09-Mar-2010 Elliott Hughes <enh@google.com> Fix a comment.

Change-Id: Iba79dbc04876d5c7cb93aba56541e7dda3c6f887
erverSocket.java
d2af45a6fd008ceb958ac74e5a50e582b8419e9c 05-Mar-2010 Elliott Hughes <enh@google.com> Implement the Java 6 NetworkInterface/InterfaceAddress functionality.

The Java bits are based on harmony's code (though only the bit that pulls
out the sub-interfaces is copied verbatim), but the native side is new
code, continuing our previous plan of (a) doing the least possible work
on the native side and (b) using the BSD getifaddrs(3) interface as our
portability layer.

This patch also updates our NetworkInterfaceTest to be the latest code
from harmony's java6 branch.

We pass all the harmony and jtreg tests, and visual inspection shows that
the untested (and hard to test) bits -- such as prefix length and hardware
address -- are correct.
netAddress.java
nterfaceAddress.java
etworkInterface.java
a2a7fa1da77a6aaac09595f5712bc4a450ad2025 12-Feb-2010 Steinar H. Gunderson <sesse@google.com> Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true.
netAddress.java
e5a4be15160c6f2cf54729ab29de21c0944dfbce 02-Feb-2010 Elliott Hughes <enh@google.com> Add a missing "static", found by FindBugs.
ddressCache.java
4c5cbf2953ada194c4dc9d7b387615b1c6fe3e63 20-Jan-2010 Elliott Hughes <enh@google.com> One true way to query "java.net.preferIPv6Addresses".

Also stop querying and passing this boolean to code that doesn't care. (We
sort our InetAddress[]s appropriately, so most code doesn't need to worry
about this.)

Bug: http://code.google.com/p/android/issues/detail?id=5903
atagramSocketImpl.java
netAddress.java
ulticastSocket.java
ocket.java
048303b64df9c987ae2f57b6bf88ff5ac1b5cca0 16-Jan-2010 Elliott Hughes <enh@google.com> Rewrite InetAddress' DNS cache.

Replace harmony's two 5-element linked lists with a single 512-element
LinkedHashMap. Greatly reduce the time we spend under locks (and no network
I/O is done under a lock any more!). Take advantage of various properties
of how the cache is used to avoid having to do much explicit work to handle
expiry.

I've also optimized the usual no-SecurityManager/no custom system properties
configuring cache TTLs case (without making the slow path much slower than it
already was).

I've also updated the native method names to correspond to the C functions
they're really wrapping (rather than completely different IPv4-only ones
they probably used to wrap long ago).

I've also improved the InetAddress documentation.

Bug: 2320435
ddressCache.java
netAddress.java
egCacheElement.java
egativeCache.java
55392539fea537abfb6581b474918f9d611fba27 16-Dec-2009 Jesse Wilson <jessewilson@google.com> Update luni package to Harmony r888752.

Conflicts:
libcore/luni/META-INF/MANIFEST.MF
libcore/luni/make/findbugs-exclude-filter.xml
libcore/luni/src/main/java/java/io/BufferedOutputStream.java
libcore/luni/src/main/java/java/io/BufferedReader.java
libcore/luni/src/main/java/java/io/CharArrayReader.java
libcore/luni/src/main/java/java/io/StringReader.java
libcore/luni/src/main/java/java/lang/StrictMath.java
libcore/luni/src/main/java/java/lang/ref/ReferenceQueue.java
libcore/luni/src/main/java/java/net/Inet4Address.java
libcore/luni/src/main/java/java/net/InetAddress.java
libcore/luni/src/main/java/java/util/ArrayList.java
libcore/luni/src/main/java/java/util/EnumSet.java
libcore/luni/src/main/java/java/util/HugeEnumSet.java
libcore/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyConstantPool.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IPlatformConstants.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
libcore/luni/src/main/native/hyzip/shared/zipcache.c
libcore/luni/src/main/native/hyzip/shared/zipsup.c
libcore/luni/src/main/native/include/jni.h
libcore/luni/src/main/native/include/jni_types.h
libcore/luni/src/main/native/include/jvmti.h
libcore/luni/src/main/native/include/jvmti_types.h
libcore/luni/src/main/native/launcher/unix/main_hlp.c
libcore/luni/src/main/native/luni/shared/OSNetworkSystem.c
libcore/luni/src/main/native/luni/shared/file.c
libcore/luni/src/main/native/luni/windows/makefile
libcore/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedOutputStreamTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedReaderTest.java
libcore/luni/src/test/java/tests/api/java/io/SerializationStressTest.java
libcore/luni/src/test/java/tests/api/java/net/SocketTest.java
libcore/luni/src/test/java/tests/api/java/util/ArrayListTest.java
libcore/luni/src/test/java/tests/api/java/util/EnumSetTest.java
libcore/luni/src/test/java/tests/api/java/util/TimerTest.java
atagramPacket.java
atagramSocket.java
netAddress.java
erverSocket.java
ocketPermission.java
RL.java
RLConnection.java
RLEncoder.java
RLStreamHandler.java
b5fc5ecd3fe5315fc2756c0c25adc458cc8c8d91 20-Nov-2009 Elliott Hughes <enh@google.com> Rewrite NetworkInterface's JNI for IPv6.

The old ioctl SIOCGIFCONF implementation of getNetworkInterfaces only returns
IPv4 addresses. Now we've switched everything over to IPv6, that's not good
enough. This change (a) implements glibc/BSD-like getifaddrs(3)/freeifaddrs(3)
for Android, and (b) rewrites our getNetworkInterfaces to use that method. Of
particular note is that we now do more of the work in Java. The JNI hands back
a Java equivalent of getifaddrs(3)'s linked list of ifaddrs structs. The new
package-private java.net.InterfaceAddress class serves as Java's "struct
ifaddrs".

The old implementation was also broken: SIOCGIFCONF doesn't actually return
interface indexes from the kernel as the old code believed, so we were
pulling the address family out of the IPv4 address it returned, leading
us to assign the index 2 to all network interfaces. This caused all kinds of
weird behavior later.

I also had to fix GenericIPMreq so that its interface index field is actually
set. The native code gets passed one of these objects when setNetworkInterface
is called, so it's kind of important that the object identify which interface
it's supposed to correspond to.

I've also added missing copyright headers.

This fixes all of the harmony tests on the simulator and on the device. It
fixes several but not all of the jtreg MulticastSocket and IPv6 tests.
nterfaceAddress.java
etworkInterface.java
7861ea9a813b337a4abd0378584baae9cc177896 12-Nov-2009 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.oneTimeInitialization.

Do this work at JNI registration time, as we do for almost everything else.
(I did this to rule out a warning from the dalvikvm deadlock prediction
code, which doesn't like the unusual lock ordering at initialization time,
and although it didn't make any difference to that, I prefer to have a
defined static order of initialization.)
atagramSocket.java
erverSocket.java
ocket.java
fc354fea0c535ceef679e8856a73dd05be8351df 17-Oct-2009 Elliott Hughes <enh@google.com> Improve error handling in InetAddress native code.

Fix a bug where we changed the return values of functions such
as byteArrayToSocketAddress without changing the logic in the
callers that's supposed to distinguish success and failure.
For simplicity, I've switch all of these functions over to
returning bool, and I've gone through all the callers to ensure
we're using the right check now. (This is the majority of the
diff.)

Also switch to throwing IllegalArgumentException instead of SocketException
when we find ourselves with a bad byte[] --- before we were throwing
a checked exception we weren't allowed to (from native code, which
can't actually be checked statically) and then trying to cover up
in Java.

I've also simply removed one case where we were trying to mask an
OutOfMemoryError with a SocketException.

I also removed dead code in socketAddressToString: this function's
sole caller always passed false for withPort. This makes the
temporary variable and the copying (which was unsafe) unnecessary.

In instances where I was already changing the code, I've removed
bogus "handle == 0" failures, but I'll come back and remove all
the other instances in another patch.

Since I was in connectSocketImpl, I've removed the dead second half
of that method.
netAddress.java
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.
atagramSocketImpl.java
netAddress.java
arURLConnection.java
etworkInterface.java
ocketAddress.java
RL.java
RLClassLoader.java
e8596906d75fd8ccda31600d71ad56391cd7cd3a 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Manual merge of change I3665f82b into master.
netAddress.java
9483551bcc25e4df0a27d6548b54e1971fac9aea 21-Sep-2009 Joshua Bloch <jjb@google.com> Fixed LinkedHashMap bug 2121546
Also made minor improvements in LinkedHashMap and NegativeCache.
(The "opportunities for improvement" were discovered while investigating the bug.)
egCacheElement.java
egativeCache.java
ec67773c5d9bbdbff7e846ef28816a3870d4cac2 18-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Use native code to convert IP addresses to strings.

- Add a byteArrayToIpString method to the INetworkSystem interface and implement
it in native code
- Fix the native code so it does better error reporting
- Change InetAddress's getHostAddress, getHostName and getCanonicalHostName
methods to use it and remove the IPv4-only Java implementations
- Remove Inet6Util.createIPAddrStringFromByteArray
- Fix InetAddress so getByAddress(null) throws UnknownHostException instead of
NullPointerException for compatibility with the RI.

Change-Id: I26548922e9eed63b295173456183c4ab3ce20718
net4Address.java
net6Address.java
netAddress.java
55b49708e6a5f5f5047513b67094257b32ff9e93 11-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Remove code duplication in InetAddress.getByAddress.

Change-Id: Id2d72572fbe5b26ff4be9a2c959c41a48b859ea0
netAddress.java
051128862ae7c5c031b8ddb763848ed264a63746 26-Aug-2009 Lorenzo Colitti <lorenzo@google.com> InetAddress refactoring.

1. Refactor all protocol-specific methods from InetAddress into Inet[46]Address.
2. Move all protocol-specific constants from InetAddress into Inet[46]Address.

This change should have no effect on the stack's behaviour but makes it easy to
find parts of the code that still have dependencies on IPv4 so they can be
examined and fixed.

Change-Id: I70860ee04cf7c01bffaa35c8c64199f69d99826f
atagramSocket.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
ulticastSocket.java
erverSocket.java
ocket.java
1b544a6111a1005e502559a6e5f269c8ecf4a53b 26-Aug-2009 Lorenzo Colitti <lorenzo@google.com> IPv6 fixes to java.net.InetAddress.

1. Make hashCode() do something that makes sense for IPv6 addresses.
2. Expand coverage of hashCode unit test.
3. Fix failing regression test for getAllByName().
4. Document that the getByName test is broken. I will fix it in a future change.
5. Expand test coverage of the isMulticastAddress test to include IPv6 and
non-multicast addresses.

All tests now pass.

Change-Id: I6f52c7c3213dd01bf773228b1ed5d44df813f877
net6Address.java
a389b4a499f40379b0b204d7ba1c2057663d95c0 11-Aug-2009 Jesse Wilson <jessewilson@google.com> Update Luni to Harmony r802921.

Notable changes:
- replaced StringBuffer with StringBuilder in several places
- fixed a problem with BufferedInputStream's newline characters (EBCDIC)
- cleanup Timer's finalizer helper object
- new cache for the canonical path of a file
- fixed concurrency issue with ArrayList
- floating point parsing now trims length for very small numbers
- encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem)
- Harmony now implements floor and ceil in Java. We continue to use native code.
erverSocket.java
ocketImpl.java
ocketPermission.java
RI.java
RIEncoderDecoder.java
RLClassLoader.java
RLConnection.java
RLEncoder.java
RLStreamHandler.java
1f2d2815dc31bf3c464eec6d1de7e428d7f1dcf6 29-Jul-2009 Lorenzo Colitti <lorenzo@google.com> Try to connect to all the IP addresses of a host instead of just the first.
ocket.java
ca8f5b66c546d8545e41f71b6fb852424c681881 29-Jul-2009 Lorenzo Colitti <lorenzo@google.com> Store all IP addresses for a hostname instead of just one.
netAddress.java
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
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
onnectException.java
ontentHandler.java
ontentHandlerFactory.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpRetryException.java
ttpURLConnection.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
egCacheElement.java
egativeCache.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketAddress.java
ocketException.java
ocketImpl.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketPermissionCollection.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
onnectException.java
ontentHandler.java
ontentHandlerFactory.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpRetryException.java
ttpURLConnection.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
egCacheElement.java
egativeCache.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketAddress.java
ocketException.java
ocketImpl.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketPermissionCollection.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
ackage.html
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
onnectException.java
ontentHandler.java
ontentHandlerFactory.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpRetryException.java
ttpURLConnection.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
egCacheElement.java
egativeCache.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketAddress.java
ocketException.java
ocketImpl.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketPermissionCollection.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
ackage.html
ac4f307115a738b0206030fe0d127f7c7f035b03 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
netAddress.java
b7926325a1c1a370c84c81db80372f59af240a53 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
netAddress.java
ocketPermission.java
RLConnection.java
687f18b91f4a0a728a027579110953ee729adcb8 22-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127436
netAddress.java
egCacheElement.java
egativeCache.java
ocket.java
a0881d052ee72e3f7e773374e9b1aa75fbd6be4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
netAddress.java
erverSocket.java
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
onnectException.java
ontentHandler.java
ontentHandlerFactory.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpRetryException.java
ttpURLConnection.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
egCacheElement.java
egativeCache.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketAddress.java
ocketException.java
ocketImpl.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketPermissionCollection.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
ackage.html
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
uthenticator.java
indException.java
acheRequest.java
acheResponse.java
onnectException.java
ontentHandler.java
ontentHandlerFactory.java
ookieHandler.java
atagramPacket.java
atagramSocket.java
atagramSocketImpl.java
atagramSocketImplFactory.java
ileNameMap.java
ttpRetryException.java
ttpURLConnection.java
net4Address.java
net6Address.java
netAddress.java
netSocketAddress.java
arURLConnection.java
alformedURLException.java
ulticastSocket.java
egCacheElement.java
egativeCache.java
etPermission.java
etworkInterface.java
oRouteToHostException.java
asswordAuthentication.java
ortUnreachableException.java
rotocolException.java
roxy.java
roxySelector.java
roxySelectorImpl.java
esponseCache.java
ecureCacheResponse.java
erverSocket.java
ocket.java
ocketAddress.java
ocketException.java
ocketImpl.java
ocketImplFactory.java
ocketOptions.java
ocketPermission.java
ocketPermissionCollection.java
ocketTimeoutException.java
RI.java
RIEncoderDecoder.java
RISyntaxException.java
RL.java
RLClassLoader.java
RLConnection.java
RLDecoder.java
RLEncoder.java
RLStreamHandler.java
RLStreamHandlerFactory.java
nknownHostException.java
nknownServiceException.java
ackage.html