2ff0178da4
Adjust fromIndex in String#lastIndexOf if necessary
...
If fromIndex 'is greater than or equal to the length of this string,
it has the same effect as if it were equal to one less than the length
of the string':
http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#lastIndexOf%28int,%20int%29
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-25 15:32:33 -05:00
b20dcd268c
Merge pull request #85 from dscho/simple-regex
...
Simple regex
2013-10-21 13:30:57 -07:00
728473e9ad
Support escaped octal and hexadecimal characters in regular expressions
...
In the previous commit, we did not support characters in regular
expressions specified via \0..., \x... or \u... yet. This is a bit more
involved, therefore support for them is added in its own commit.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 13:34:33 -05:00
f55ac46602
Support trivial regular expressions with special escaped characters
...
When a regular expression contains escaped characters such as the
backslash, it is actually still a literal string. So let's support the
trivially-escaped characters, too, that are documented in
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 12:00:17 -05:00
02e433ce61
Merge pull request #84 from dscho/random-access-file
...
Write support for the RandomAccessFile
2013-10-21 09:38:44 -07:00
e485a468f0
Merge pull request #82 from dscho/dates
...
Implement date parsing / formatting
2013-10-21 09:36:46 -07:00
3681ae508e
Implement a rudimentary RandomAccessFile#getChannel
...
This implementation is by no means intended to be complete, just enough to
support running http://http://loci.wisc.edu/software/bio-formats's
loci.formats.tools.ImageConverter tool.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:59 -05:00
3a67f81b50
Add the FileChannel class
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:59 -05:00
caec6eba67
Add the BufferUnderflowException
...
Pre-compiled code might expect the class to exist...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:59 -05:00
4f83f8dd98
ByteBuffer: add missing order() methods
...
Avian's ByteBuffer implementation is actually fixed to big endian. So
let's throw an exception if the user tries to change that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:59 -05:00
2c0a1c726d
Add write support for RandomAccessFile
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:59 -05:00
905ddfe613
Add the RandomAccessFile(File file, String mode) constructor
...
As per the Java API.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:59:58 -05:00
18f6f7881a
RandomAccessFile: support opening for read/write
...
So far, we only allowed opening in read-only mode. Now, we also support
read/write mode in addition.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:55:26 -05:00
4f8b3f8865
Implement a minimal SimpleDateFormat
...
For the moment, this class can only handle dates of the form
"yyyy-MM-dd'T'HH:mm:ss".
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-21 10:41:40 -05:00
c46baa3524
Add a minimal implementation of DataOutputStream
...
This implements all the methods required by the DataOutput interface; to
run Bio-Formats' bfconvert tool, actually only the write() and writeByte()
methods would be required.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:10:05 -05:00
2f87be954c
Add the DataInput / DataOutput interfaces
...
These are part of the standard Java class library API.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:10:05 -05:00
6f9a9fd15d
Add java.lang.Double#doubleToLongBits
...
It is different than #doubleToRawLongBits only when the input value
is not a number.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:01:36 -05:00
a9ecf1eaed
Complete the java.util.Arrays#toString family of methods
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:01:36 -05:00
396c0822cd
Add java.lang.Character#isISOControl(char)
...
... as per the public JavaDoc at
http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isISOControl%28char%29
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:01:36 -05:00
7aca1b1307
Add java.lang.Boolean#parse(String)
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 15:01:36 -05:00
7476603e1c
Add minimal implementations of ParseException / ParsePosition
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 14:58:44 -05:00
dcfcd193be
Implement Calendar#getTime
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 14:58:44 -05:00
466a7fc0c0
Be more verbose when complaining about a non-trivial regex
...
In particular when constructing regular expressions before compiling them,
it is a good idea to state which exact expression is non-trivial when
complaining about it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de >
2013-10-18 14:56:05 -05:00
bfe7b9110a
Removed exception message based on Josh's recommendation
2013-07-17 11:52:48 -06:00
7da59277e5
This solves a class cast exception from a call to .values() from an UnmodifiableMap. It also solves an issue where you can modify an unmodifiable collection through the Iterator or ListIterator (depending on the structure type).
2013-07-15 08:54:44 -06:00
8eec1a0339
fixing problems!
2013-07-08 16:30:17 -06:00
54484bc2eb
add zipOutputStream and change DeflaterOutputStream
2013-07-08 14:13:08 -06:00
6970bb26ae
updating zipentry
2013-07-08 13:55:00 -06:00
055f820cac
adding zipentry and zipoutputstream classes
2013-07-05 14:39:30 -06:00
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
b66d8b9fbf
Expanded DatagramChannel and corrected blocking configuration in connect().
2013-07-02 10:10:05 -06:00
6b3a352b38
Merge remote-tracking branch 'origin/master'
2013-04-30 23:08:18 -06:00
bd2ebfce07
Merge branch 'master' of https://github.com/ReadyTalk/avian
2013-04-29 11:45:32 -06:00
a41f8c0103
Added more to the avian classpath for the collection interface as well as the list interface
...
Added to collection:
public boolean containsAll(Collection<?> c);
public boolean removeAll(Collection<?> c);
Added to list:
public boolean addAll(int startIndex, Collection<? extends T> c);
Also where possible for inner classes I made them extend the abstract version instead of just implement the interface. This helps reduce code duplication where possible.
These changes were necessary to support protobuf 2.5.0
2013-04-29 11:32:56 -06:00
4e12847858
code rearrangment to improve state of Android libcore tests
...
This mainly moves several sun.misc.Unsafe method implementations from
classpath-openjdk.cpp to builtin.cpp so that the Avian and Android
builds can use them.
It also replaces FinalizerReference.finalizeAllEnqueued with a no-op,
since the real implementations assumes too much about how the VM
handles (or delegates) finalization.
2013-04-23 13:47:15 -06:00
b4c3eea0f1
set InvocationTargetException target
...
When using the OpenJDK classpath, the target exception and the
Throwable cause are two different fields; we must set them both.
2013-04-18 11:23:59 -06:00
8546ca5670
fix Avian classpath build
2013-02-22 11:55:01 -07:00
42d39b1af1
more Android class library work
2013-02-21 15:37:17 -07:00
2d11e7ccd4
Add last modified to file
2013-02-09 09:42:23 +02:00
c8ca83836a
Fix RAF
2013-02-09 09:42:12 +02:00
f1b2b3f78d
RandomAccessFile
2013-02-09 09:42:12 +02:00
d6aff87ef9
Add java lang math methods
2013-02-09 09:42:11 +02:00
57a67fb312
Fix field names, add getters to j.l.Package
2013-02-04 14:14:45 +01:00
1db67e463f
Add Class#isEnum and improve error handling in Enum.valueOf
2013-02-03 16:03:15 +01:00
b1eb4b9718
Adds code to get the Scala REPL working
2013-01-30 04:31:38 +01:00
5061d7fe4d
Making Thread's isInterrupted() non-static and make it use the current instance's interrupted variable.
2012-12-25 18:12:03 -07:00
74b070f9cc
classpath: java.nio.ByteOrder
...
Used by jruby.
(Not saying I'm gonna implement String.format :)
2012-11-11 06:06:18 +01:00
f8ea506021
classpath: j.l.{Integer,Long}.to{Octal,Binary}String
...
Offer support for toOctalString and toBinaryString in Integer and Long.
2012-11-05 00:10:02 +01:00
be952acbcb
classpath: Closeable & Flushable
2012-11-04 02:14:17 +01:00
33fed1b710
Merge branch 'master' of github.com:ReadyTalk/avian
2012-10-30 14:00:16 -06:00