2005-05-03 Andrew Overholt <overholt@redhat.com>
PR libgcj/21372:
* gnu/java/nio/channels/FileChannelImpl.java: Return null if lock
could not be acquired.
* java/nio/channels/FileLock.java (toString): Re-implement to be
in line with other implementations.
From-SVN: r99188
2005-02-17 Ito Kazumitsu <kaz@maczuka.gcd.org>
* gnu/java/nio/channels/FileChannelImpl.java (write(ByteBuffer)):
Move the position of the source buffer forward.
From-SVN: r95184
2004-11-11 Casey Marshall <csm@gnu.org>
* gnu/java/nio/FileLock.java (isValid): locks are valid if the
channel is open.
* gnu/java/nio/channels/natFileChannelPosix.cc (lock): use
'F_RDLCK' for shared locks, 'F_WRLCK' for exclusive locks.
From-SVN: r90538
2004-07-17 Mark Wielaard <mark@klomp.org>
* gnu/java/nio/channels/FileChannelImpl.java (truncate): Only truncate
when size is smaller.
* java/io/RandomAccessFile.java (setLength): Use truncate for
shrinking the file and seek plus write for expanding the file.
2004-07-17 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/channels/natFileChannelPosix.cc
(implTruncate): Always save current position. Only reposition file
pointer to where we started if not beyond new lenght. Reposition file
pointer to file length if it points beyond the end of file.
From-SVN: r84868
2004-03-14 Andreas Tobler <a.tobler@schweiz.ch>
* gnu/java/nio/channels/natFileChannelPosix.cc: Implement
munmap_adaptor and msync_adaptor for older POSIX_C_SOURCES specs.
(MappedByteBufferImpl::unmapImpl): Use munmap_adaptor.
(MappedByteBufferImpl::forceImpl): Use msync_adptor.
From-SVN: r79462
2004-03-11 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/channels/natFileChannelEcos.cc: Totally reworked.
This file was was just copied form java/io/natFileDescriptorEcos.cc
and never changed to compile correctly.
From-SVN: r79320
* gnu/java/nio/channels/FileChannelImpl.java: New class, renamed
from java/nio/channels. Don't depend on FileDescriptor.
(in, out, err): New static fields.
(mode): New field.
(SET, CUR, READ, WRITE, APPEND, EXCL, SYNC, DSYNC): Moved constants
from FileDescriptor.
(by): Removed MappedByteBuffer field.
(map): New working implementation.
* gnu/java/nio/channels/natFileChannelPosix.cc: New file, though
some code "ported" from natFileDescriptoPosix.cc.
* gnu/java/nio/channels/natFileChannelEcos.cc: Likewise.
* gnu/java/nio/channels/natFileChannelWin32.cc Likewise.
From-SVN: r78659