Commit Graph

71 Commits

Author SHA1 Message Date
Joel Dice
3a2a46499e add Reader.mark/markSupported/reset 2011-01-20 09:34:46 -07:00
Joel Dice
51c56c1b3c add PrintStream.print[ln] overloads for primitives and char arrays 2011-01-20 08:26:56 -07:00
Joel Dice
a5742f5985 update copyright years 2010-12-05 20:21:09 -07:00
Joel Dice
d00f4c5390 fix BufferedInputStream.read to not read more than specified length 2010-12-01 15:41:55 -07:00
Joel Dice
cb69ac23bd Merge remote branch 'origin/master' into openjdk
Conflicts:
	classpath/java/lang/String.java
	src/posix.cpp
2010-11-03 11:54:41 -06:00
Joel Dice
7fffba29e6 Keep reading in BufferedInputStream.read until in.available() <= 0
This corresponds to the documented behavior of OpenJDK's version.
2010-09-17 16:08:42 -06:00
Zsombor Gegesy
6752505cb8 add File.canRead()/File.canWrite() implementation 2010-09-11 21:23:46 +02:00
Zsombor Gegesy
5dadac2cb8 API additions for compatibility with harmony's java.util package 2010-09-11 21:23:46 +02:00
Eric Scharff
a26eb1b2b9 Fix missing flush in PrintStream 2010-09-05 09:07:18 -06:00
Zsombor Gegesy
1daa93d3c4 add ability to append to files 2010-08-16 09:23:48 -06:00
Joel Dice
f0f35a920f return a useful value from InflaterInputStream.available
Note the following excerpt from PNGFileFormat.java in SWT:

     /*
     * InflaterInputStream does not consume all bytes in the stream
     * when it is closed. This may leave unread IDAT chunks. The fix
     * is to read all available bytes before closing it.
     */
     while (stream.available() > 0) stream.read();
     stream.close();

This code relies on the documented behavior of
InflaterInputStream.available, which must return "0 after EOF has been
reached, otherwise always return 1".  This is unlike
InputStream.available, which is documented to return "the number of
bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input
stream", and says nothing about how many bytes are left until the end
of stream.

This commit modifies InflaterInputStream.available to behave according
to Sun's documentation.
2010-08-04 18:54:47 -06:00
mjensen
a6998238d5 Additional of several interfaces which can be used in serialization 2010-05-10 10:17:06 -06:00
JET
b6936fb597 optimized InputStreamReader.read() 2010-04-14 09:43:56 -06:00
JET
b2f5e71d22 ARM and UTF-8 work 2010-04-14 09:26:50 -06:00
Joel Dice
2c4e229e6e convert forward slashes to back slashes in Windows paths 2010-01-11 08:31:01 -07:00
Joel Dice
585dba004b ignore redundant calls to File{In|Out}putStream.close
Previously, we threw an IOException, which did not match Sun's behavior.
2010-01-09 18:22:16 -07:00
Joel Dice
9a056da2f7 increase default buffer size in BufferedInputStream
The previous value of 32 bytes did not perform well.  This increases it to 4096 bytes, which matches BufferedOutputStream.
2010-01-09 18:20:15 -07:00
Joel Dice
6118792ffd update copyright years 2009-12-02 19:08:29 -07:00
Joel Dice
447741d6ec implement java.io.File.renameTo 2009-09-28 17:45:47 -06:00
Joel Dice
58e3c3013a pass start and end indexes to String.getChars in Writer.write, not start and length 2009-08-13 08:55:35 -06:00
Joel Dice
626c514373 add listFiles and isFile methods to java.io.File 2009-08-04 17:59:07 -06:00
Joel Dice
d1018bf078 update copyright years 2009-03-15 12:02:36 -06:00
Joel Dice
8bcc78b5b7 add InputStreamReader(InputStream,String) 2009-02-16 18:22:19 -07:00
Ryan Forbes
277278b331 Fixed off by one in list method. 2009-02-03 15:28:39 -07:00
JET
e86acf4543 added separator to String and added IOException to vm.pro 2009-01-02 13:25:05 -07:00
Joel Dice
ae75be5683 add copyright headers 2008-10-03 14:57:40 -06:00
Joel Dice
4c307ae8c6 implement minimal, read-only versions of RandomAccessFile and ZipFile 2008-10-03 14:15:47 -06:00
Joel Dice
a16a00a7fb implement ByteArrayOutputStream.reset 2008-09-26 15:29:38 -06:00
Joel Dice
27efbcf5e1 fix single-byte BufferedInputStream.read to generate unsigned result 2008-09-02 14:54:34 -06:00
Joel Dice
0ae338e74a fix various bugs in BufferedReader.readLine 2008-07-15 08:59:00 -06:00
Eric Scharff
7534459fec Stylistic tweaks 2008-07-13 21:54:07 -06:00
Zsombor
dcccddeb55 add FilenameFilter interface 2008-07-13 18:24:23 -06:00
Zsombor
2e0ca31148 implement File.list and File.mkdirs 2008-07-13 18:14:37 -06:00
Joel Dice
14e2513590 fix some API compatibility issues in the class library 2008-05-07 17:44:43 -06:00
Joel Dice
7dd9b96717 add additional methods and fields to class library 2008-03-20 18:40:18 -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
6954c9c377 Fixes for PushbackReader (which only can push back one char) and StringReader. 2007-12-18 12:19:52 -07:00
Joel Dice
d24b633665 fix return value of ByteArrayOutputStream.size() 2007-11-27 16:59:49 -07:00
Joel Dice
74235ea33c add ByteArrayOutputStream.size() 2007-11-27 10:30:55 -07:00
Joel Dice
7a4cca45c2 fix subtle length vs. limit bug in ByteArrayInputStream 2007-10-31 10:11:14 -06:00
Eric Scharff
2fd2df53fd Fixed thinko in ByteArrayInputStream 2007-10-30 16:52:24 -06:00
Eric Scharff
b85c643251 Minor optimization for ByteArrayInputStream 2007-10-30 15:37:46 -06:00
Eric Scharff
907ce57975 Order of arraycopy backwards 2007-10-30 15:10:32 -06:00
Eric Scharff
df79f410f1 Optimize bulk reads from ByteArrayInputStream 2007-10-30 15:08:49 -06:00
Joel Dice
75d4a4ff96 implement a few classpath methods required by SWT for Win32 2007-10-29 14:57:33 -06:00
Joel Dice
b12b779c7f add support for passing properties to the VM via JNI; use vm.builtins property to specify builtin libraries 2007-10-25 12:33:43 -06:00
Joel Dice
5bfd90cfed more system-specific tweaks for windows port 2007-10-24 10:24:02 -06:00
Joel Dice
8ae36c05b7 lots of new instructions and bugfixes 2007-09-29 20:48:27 -06:00
Eric Scharff
0efc498837 Another place where printing null should be permitted 2007-09-27 15:21:39 -06:00
Eric Scharff
101b0c3b0e Support printing of null references 2007-09-27 15:05:55 -06:00