Commit Graph

39 Commits

Author SHA1 Message Date
Joel Dice
cbde34620c update copyright years 2015-03-13 12:52:59 -06:00
Joshua Warner
1b17ca146b Merge pull request #242 from dicej/copyright
update copyright years
2014-04-24 18:45:18 -06:00
Joel Dice
a41efb76c5 avoid NPE in URL.set when file is null 2014-04-23 15:51:57 -06:00
Joel Dice
9b7d0d1624 update copyright years 2014-04-23 15:33:41 -06:00
Joel Dice
6e7149061c various refinements to network implementation
The main idea is to make DatagramChannel and *SocketChannel behave in
a way that more closely matches the standard, e.g. allow binding
sockets to addresses without necessarily listening on those addresses
and accept null addresses where appropriate.  It also avoids multiple
redundant DNS lookups.

This commit also implements CharBuffer and BindException, and adds the
Readable interface.
2014-03-31 15:22:14 -06:00
Joel Dice
5f40c1642e don't throw UnknownHostException from InetAddress.getByName("0.0.0.0")
0.0.0.0 means any local interface, which is commonly used by servers
which wish to listen on all interfaces.
2013-12-18 10:12:10 -07:00
Ilya Mizus
45ee25f68c Implement socket API 2013-11-08 09:55:43 -07:00
Joel Dice
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Joshua Warner
33fed1b710 Merge branch 'master' of github.com:ReadyTalk/avian 2012-10-30 14:00:16 -06:00
Joshua Warner
4c20465294 add basic URLClassLoader implementation 2012-10-30 09:34:16 -06:00
Joel Dice
a3c4b60f43 rename package avian.avian_vm_resource to avian.avianvmresource
This package name must match the URL protocol we use for loading
embedded resources, but OpenJDK's URL class won't tolerate underscores
in a protocol name.  Also, I had not updated the names of the native
methods in avian.avianvmresource.Handler, leading to
UnsatisfiedLinkErrors when they were called.
2012-10-06 15:33:24 -06:00
Joel Dice
b325221579 rename "resource" URL protocol to "avian_vm_resource"
This fixes a problem with JOSM, which attaches its own meaning to the
"resource" protocol.  The new name is less likely to cause such
conflicts.
2012-08-11 19:01:32 -06:00
Joel Dice
9974d91648 implement DatagramChannel.receive and fix Datagrams to be Java 6 compatible 2012-07-10 14:09:14 -06:00
Joel Dice
c602f4673b implement java.nio.channels.DatagramChannel 2012-07-03 11:24:05 -06:00
Mike Jensen
e6e65ecfdc The file already contains the leading slash. hotspot URL.getFile() also returns a leading slash, so instead of removing the leading slash on the file, we just wont append an extra one here 2012-06-28 10:24:35 -06:00
Joel Dice
0addd8c814 update copyright years 2012-05-11 17:43:27 -06:00
Joel Dice
b5fda8ee13 use avian.http.Handler for http(s) URLs, not avian.file.Handler 2012-02-27 13:38:47 -07:00
Joel Dice
574a8ea1e2 Merge branch 'master' into prv-ga-merge 2012-02-27 13:28:06 -07:00
Joel Dice
750e5f903c include leading slash in path when parsing URLs in URLStreamHandler
This matches the behavior of OpenJDK's version.
2012-02-18 15:14:16 -07:00
Dain
70408ea717 Fix a bug in parsing the port value from a URL. 2012-01-12 09:55:03 -07:00
Dain
651b0eb49a Add rudimentary support for http/https protocols in URL. 2012-01-12 09:54:58 -07:00
Ben Limmer
b3850ac76d Initial attempt at resolving SWT3.7 missing operatons in Avian. Everything seems to be working except floatToIntBits, hence the test case failing. 2011-12-28 15:52:53 -07:00
Joel Dice
3dd091c67a implement jar and file URL stream handlers 2011-03-25 19:14:21 -06:00
Joel Dice
dd52908f89 add URLConnection methods 2011-01-11 18:25:34 -07:00
Joel Dice
a5742f5985 update copyright years 2010-12-05 20:21:09 -07:00
Joel Dice
47d9039b69 switch from gethostbyname to getaddrinfo on POSIX systems
gethostbyname may return any combination of IPv4 and IPv6 addresses,
and it's not safe to assume the first address is IPv4, which is all
our code is currently prepared to handle.  In contrast, getaddrinfo
allows us to specify whether we want IPv4, IPv6, or both.

We should eventually make this switch on Windows as well, but the
status of getaddrinfo in Windows 2000 is not clear, and MinGW's
ws2tcpip.h only declares it for XP and above.

This commit also adds InetAddress.getByName for explicit DNS lookups.
2010-06-14 16:09:56 -06:00
Joel Dice
20ea82ec2e various tweaks for Classpath compatibility 2009-06-06 20:32:44 -06:00
Joel Dice
fccf906349 add minimal java.net.Socket implementation to support Socket.setTcpNoDelay 2008-11-22 15:32:53 -07:00
Eric Scharff
13a535d1c6 Added a getContentLength() method to URLConnection
This is particularly important if you want to get the number of bytes of a
resource loaded by the class loader:
  getClass().getResource("myFile").openConnection().getContentLength()
2008-07-15 09:36:52 -06:00
Joel Dice
3a208edbbc update NIO code to be more compatible with Java 2008-03-25 11:18:17 -06:00
Joel Dice
2edaa82801 prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
Eric Scharff
98269286e5 Implemented a basic NIO socket channel interface. Non-blocking socket channels
and server socket channels are implemented.  This version works but only when
libnative is linked with g++ (because of C++ object creation code that fails
without this linking)
2007-10-05 15:32:56 -06:00
Joel Dice
7a340fd8fb bugfixes 2007-08-19 14:24:26 -06:00
Joel Dice
59638543c7 various performance tweaks and bugfixes 2007-08-19 13:45:51 -06:00
Joel Dice
d3931b4853 flesh out resource URL scheme implementation 2007-08-10 17:45:47 -06:00
Joel Dice
2e9b9fe8d4 flesh out URL and friends 2007-08-02 19:49:32 -06:00
Joel Dice
1997ea6b8c acquire class lock before running static initializer; wrap exceptions thrown from static initializers in ExceptionInInitializerError instances 2007-08-01 17:48:36 -06:00
Joel Dice
a2bd7d0668 GC stress fixes and other bugfixes; classpath progress 2007-07-29 17:32:23 -06:00
Joel Dice
a9e10d1c7f more classpath progress 2007-07-28 19:29:01 -06:00