summaryrefslogtreecommitdiff
path: root/java/io/RandomAccessFile.java
Commit message (Collapse)AuthorAgeFilesLines
* * all files: Update for new FSF address.Mark Wielaard2005-07-021-2/+2
|
* 2005-05-31 Jeroen Frijters <jeroen@frijters.net>Jeroen Frijters2005-05-311-1/+1
| | | | | | | | | | | * gnu/java/nio/channels/FileChannelImpl.java (FileChannelImpl()): Removed. (FileChannelImpl(File,int)): Made private. (create): New method. * java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/RandomAccessFile.java: Updated construction of FileChannelImpl instance.
* 2005-04-29 Dalibor Topic <robilad@kaffe.org>Mark Wielaard2005-04-291-29/+33
| | | | | | | | | | | | | | | | * java/nio/channels/FileChannelImpl.java (FileChannelImpl(Sting, int)): Removed. (FileChannelImpl(File, int)) Added. Check if opened file is a directory. * java/io/FileInputStream.java(FileInputStream): Fixed javadocs. Call FileChannelImpl(File, int). * java/io/FileOutputStream.java (FileInputStream): Call FileChannelImpl(File, int). * java/io/RandomAccessFile.java (RandomAccessFile): Call FileChannelImpl(File, int). Switched constructors around.
* 2005-02-16 Michael Koch <konqueror@gmx.de>Michael Koch2005-02-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/applet/Applet.java, java/beans/AppletInitializer.java, java/beans/ExceptionListener.java, java/beans/PropertyChangeEvent.java, java/beans/PropertyChangeListenerProxy.java, java/beans/PropertyChangeSupport.java, java/beans/PropertyDescriptor.java, java/beans/VetoableChangeListenerProxy.java, java/beans/VetoableChangeSupport.java, java/io/BufferedInputStream.java, java/io/BufferedReader.java, java/io/ByteArrayInputStream.java, java/io/ByteArrayOutputStream.java, java/io/CharArrayReader.java, java/io/CharArrayWriter.java, java/io/CharConversionException.java, java/io/DataInput.java, java/io/DataInputStream.java, java/io/DataOutput.java, java/io/DataOutputStream.java, java/io/EOFException.java, java/io/FileInputStream.java, java/io/FileNotFoundException.java, java/io/FileOutputStream.java, java/io/FilenameFilter.java, java/io/FilterInputStream.java, java/io/FilterOutputStream.java, java/io/FilterReader.java, java/io/FilterWriter.java, java/io/IOException.java, java/io/InputStream.java, java/io/InputStreamReader.java, java/io/InterruptedIOException.java, java/io/LineNumberInputStream.java, java/io/LineNumberReader.java, java/io/ObjectStreamException.java, java/io/OptionalDataException.java, java/io/OutputStream.java, java/io/OutputStreamWriter.java, java/io/PrintStream.java, java/io/PrintWriter.java, java/io/PushbackInputStream.java, java/io/PushbackReader.java, java/io/RandomAccessFile.java, java/io/Reader.java, java/io/SequenceInputStream.java, java/io/Serializable.java, java/io/StreamCorruptedException.java, java/io/StreamTokenizer.java, java/io/StringBufferInputStream.java, java/io/StringWriter.java, java/io/SyncFailedException.java, java/io/UTFDataFormatException.java, java/io/UnsupportedEncodingException.java, java/io/WriteAbortedException.java, java/io/Writer.java, java/lang/AbstractMethodError.java, java/lang/ArithmeticException.java, java/lang/ArrayIndexOutOfBoundsException.java, java/lang/ArrayStoreException.java, java/lang/AssertionError.java, java/lang/Boolean.java, java/lang/Byte.java, java/lang/ClassCastException.java, java/lang/ClassCircularityError.java, java/lang/ClassLoader.java, java/lang/ClassNotFoundException.java, java/lang/CloneNotSupportedException.java, java/lang/Cloneable.java, java/lang/Comparable.java, java/lang/Compiler.java, java/lang/Double.java, java/lang/Error.java, java/lang/Exception.java, java/lang/ExceptionInInitializerError.java, java/lang/Float.java, java/lang/IllegalAccessError.java, java/lang/IllegalAccessException.java, java/lang/IllegalArgumentException.java, java/lang/IllegalMonitorStateException.java, java/lang/IllegalStateException.java, java/lang/IllegalThreadStateException.java, java/lang/IncompatibleClassChangeError.java, java/lang/IndexOutOfBoundsException.java, java/lang/InheritableThreadLocal.java, java/lang/InstantiationError.java, java/lang/InstantiationException.java, java/lang/Integer.java, java/lang/InternalError.java, java/lang/InterruptedException.java, java/lang/LinkageError.java, java/lang/Long.java, java/lang/NegativeArraySizeException.java, java/lang/NoClassDefFoundError.java, java/lang/NoSuchFieldError.java, java/lang/NoSuchFieldException.java, java/lang/NoSuchMethodError.java, java/lang/NoSuchMethodException.java, java/lang/NullPointerException.java, java/lang/Number.java, java/lang/NumberFormatException.java, java/lang/OutOfMemoryError.java, java/lang/Process.java, java/lang/Runnable.java, java/lang/Runtime.java, java/lang/RuntimeException.java, java/lang/RuntimePermission.java, java/lang/SecurityException.java, java/lang/SecurityManager.java, java/lang/Short.java, java/lang/StackOverflowError.java, java/lang/StackTraceElement.java, java/lang/StringBuffer.java, java/lang/StringIndexOutOfBoundsException.java, java/lang/ThreadDeath.java, java/lang/ThreadGroup.java, java/lang/Throwable.java, java/lang/UnsatisfiedLinkError.java, java/lang/UnsupportedOperationException.java, java/lang/VerifyError.java, java/lang/VirtualMachineError.java, java/lang/reflect/AccessibleObject.java, java/lang/reflect/Array.java, java/lang/reflect/InvocationTargetException.java, java/lang/reflect/Member.java, java/lang/reflect/Modifier.java, java/lang/reflect/Proxy.java, java/lang/reflect/ReflectPermission.java, java/lang/reflect/UndeclaredThrowableException.java, java/math/BigInteger.java, java/nio/ByteBufferHelper.java, java/nio/channels/IllegalBlockingModeException.java, java/nio/charset/spi/CharsetProvider.java, java/security/AccessControlException.java, java/security/AllPermission.java, java/security/BasicPermission.java, java/security/DigestException.java, java/security/DigestInputStream.java, java/security/DigestOutputStream.java, java/security/GeneralSecurityException.java, java/security/Guard.java, java/security/GuardedObject.java, java/security/InvalidAlgorithmParameterException.java, java/security/InvalidKeyException.java, java/security/InvalidParameterException.java, java/security/Key.java, java/security/KeyException.java, java/security/KeyManagementException.java, java/security/KeyStoreException.java, java/security/MessageDigestSpi.java, java/security/NoSuchAlgorithmException.java, java/security/NoSuchProviderException.java, java/security/Permission.java, java/security/PermissionCollection.java, java/security/Permissions.java, java/security/Principal.java, java/security/PrivateKey.java, java/security/PrivilegedActionException.java, java/security/ProviderException.java, java/security/PublicKey.java, java/security/SecureRandom.java, java/security/SecureRandomSpi.java, java/security/SignatureException.java, java/security/SignatureSpi.java, java/security/SignedObject.java, java/security/Signer.java, java/security/UnrecoverableKeyException.java, java/security/UnresolvedPermission.java, java/security/acl/AclNotFoundException.java, java/security/acl/LastOwnerException.java, java/security/acl/NotOwnerException.java, java/security/cert/CertPath.java, java/security/cert/CertPathBuilderException.java, java/security/cert/CertPathValidatorException.java, java/security/cert/CertStoreException.java, java/text/BreakIterator.java, java/text/ChoiceFormat.java, java/text/CollationElementIterator.java, java/text/CollationKey.java, java/text/Collator.java, java/text/DateFormat.java, java/text/DateFormatSymbols.java, java/text/FieldPosition.java, java/text/Format.java, java/text/MessageFormat.java, java/text/ParseException.java, java/text/ParsePosition.java, java/text/StringCharacterIterator.java, java/util/AbstractCollection.java, java/util/AbstractList.java, java/util/AbstractMap.java, java/util/AbstractSequentialList.java, java/util/AbstractSet.java, java/util/ArrayList.java, java/util/Arrays.java, java/util/BitSet.java, java/util/Collection.java, java/util/Collections.java, java/util/Comparator.java, java/util/ConcurrentModificationException.java, java/util/EmptyStackException.java, java/util/Enumeration.java, java/util/EventListener.java, java/util/EventListenerProxy.java, java/util/EventObject.java, java/util/HashMap.java, java/util/HashSet.java, java/util/Hashtable.java, java/util/IdentityHashMap.java, java/util/Iterator.java, java/util/LinkedHashSet.java, java/util/LinkedList.java, java/util/List.java, java/util/ListIterator.java, java/util/ListResourceBundle.java, java/util/Map.java, java/util/MissingResourceException.java, java/util/NoSuchElementException.java, java/util/Observable.java, java/util/Observer.java, java/util/Properties.java, java/util/PropertyPermissionCollection.java, java/util/RandomAccess.java, java/util/Set.java, java/util/SortedMap.java, java/util/SortedSet.java, java/util/Stack.java, java/util/StringTokenizer.java, java/util/TooManyListenersException.java, java/util/TreeMap.java, java/util/TreeSet.java, java/util/Vector.java, java/util/logging/Level.java, java/util/prefs/BackingStoreException.java: Fixed @author tag all over.
* 2004-11-16 Michael Koch <konqueror@gmx.de>Michael Koch2004-11-161-50/+48
| | | | | | | | | | | | | | | | | | | | | | | * java/io/BufferedReader.java, java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/FileWriter.java, java/io/OutputStreamWriter.java, java/io/PipedInputStream.java, java/io/PipedOutputStream.java, java/io/PipedReader.java, java/io/PipedWriter.java, java/io/PrintStream.java, java/io/PushbackInputStream.java, java/io/RandomAccessFile.java, java/io/Reader.java, java/io/StreamTokenizer.java, java/io/StringReader.java, java/net/NetworkInterface.java, java/net/URLClassLoader.java, java/nio/ByteOrder.java, java/nio/channels/Channel.java: Fixed javadocs all over.
* 2004-10-02 Michael Koch <konqueror@gmx.de>Michael Koch2004-10-021-1/+2
| | | | | | | | | | | | | * java/io/CharArrayWriter.java (resize): Remove redundant final modifier. * java/io/FileDescriptor.java, java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/ObjectOutputStream.java, java/io/ObjectStreamClass.java, java/io/PipedInputStream.java, java/io/RandomAccessFile.java: Reworked import statements.
* 2004-05-28 Michael Koch <konqueror@gmx.de>Michael Koch2004-05-281-1/+3
| | | | | * java/io/RandomAccessFile.java (setLength): Only extend file if new size is bigger.
* * gnu/java/nio/channels/FileChannelImpl.java (truncate): Only truncateMark Wielaard2004-05-011-5/+11
| | | | | | | | | | when size is smaller. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c (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. * java/io/RandomAccessFile.java (setLength): Use truncate for shrinking the file and seek plus write for expanding the file.
* * java/io/RandomAccessFile.java (setLength): Set position to newMark Wielaard2004-04-291-6/+12
| | | | length when new length is smaller then current position.
* 2004-04-17 Michael Koch <konqueror@gmx.de>Michael Koch2004-04-171-4/+4
| | | | | | | | | | * java/io/DataInput.java, java/io/File.java, java/io/InputStream.java, java/io/InputStreamReader.java, java/io/PushbackInputStream.java, java/io/RandomAccessFile.java: Fixed javadocs all over.
* 2004-04-08 Michael Koch <konqueror@gmx.de>Michael Koch2004-04-081-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Added gnu/java/nio/channels/Makefile to output files. * gnu/java/nio/Makefile.am: Added subdir channels. * include/gnu_java_nio_channels_FileChannelImpl.h: New file. * include/java_io_FileDescriptor.h, include/java_nio_DirectByteBufferImpl.h: Updates. * include/java_nio_channels_FileChannelImpl.h: Removed. * include/Makefile.am: Handle generation of gnu_java_nio_channels_FileChannelImpl.h. * java/nio/channels/Makefile.am (EXTRA_DIST): Removed FileChannelImpl.java. * native/jni/java-nio/Makefile.am (libjavanio_la_SOURCES): Removed java_nio_FileChannelImpl.c and added gnu_java_nio_channels_FileChannelImpl.c. * native/jni/java-io/FileDescriptor.c: Commented out all code. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: New file. * native/jni/java-nio/java_nio_DirectByteBufferImpl.c: Fixed method names. * native/jni/java-nio/java_nio_FileChannelImpl.c: Removed. 2004-04-08 Per Bothner <per@bothner.com> * java/nio/channels/Channels.java (newInputStream, newOutputStream): Optimize when argument is a FileChannelImpl. (newInputStream(FileChannelImpl), newOutputStream(FileChannelImpl)): New native methods. 2004-04-08 Per Bothner <per@bothner.com> * java/nio/channels/FileChannelImpl.java: Moved to package gnu/java/nio/channels, since we need to refer to it from java.io. * java/nio/channels/natFileChannelImpl.cc: Removed file. * 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. * java/io/FileDescriptor.java: Implement on top of FileChannel. Remove native methods. * gnu/java/nio/FileLockImpl.java (fd): Remove field, replacing it by: (ch): New FileChannelImpl field. Update constructor to match. (releaseImpl): Remove native method. Instead ... (release): Call unlock on channel. * java/io/FileInputStream.java (ch): Change type to FileChannelImpl. (<init>(File)): Allocate a FileChannelImpl, not a FileDescriptor. (<init>(FileChannelImpl)): New package-private constructor. (<init>(FileDescriptor)): Extract FileChannelImpl from arg. (available, close, read, skip): Implement using FileChannelImpl. (getFD): Allocate FileDescriptor if needed. (getChannel): Is now trivial. * java/io/FileOutputStream.java: Corresponding changes. * java/io/RandomAccessFile.java: Corresponding changes. * java/nio/MappedByteBuffer.java: (forceImpl, isLoadedImpl, loadImpl, unmapImpl): New dummy methods, to be overridden by subclass. (finalize, isLoaded, load, force): New methods. * java/nio/MappedByteBufferImpl.java: More-or-less rewrite. Now works, at least for read mapping. 2004-04-08 Per Bothner <per@bothner.com> * java/nio/CharBufferImpl.java: Inline super constructor. * java/nio/DoubleBufferImpl.java: Likewise. * java/nio/FloatBufferImpl.java: Likewise. * java/nio/IntBufferImpl.java: Likewise. * java/nio/LongBufferImpl.java: Likewise. * java/nio/ShortBufferImpl.java: Likewise. * java/nio/CharBuffer.java: Remove unused constructor. * java/nio/DoubleBuffer.java: Likewise. * java/nio/FloatBuffer.java: Likewise. * java/nio/IntBuffer.java: Likewise. * java/nio/LongBuffer.java: Likewise. * java/nio/ShortBuffer.java: Likewise. * java/nio/CharViewBufferImpl.java: New convenience constructor. Fix buggy call to super constructor. * java/nio/DoubleViewBufferImpl.java: Likewise. * java/nio/FloatViewBufferImpl.java: Likewise. * java/nio/IntViewBufferImpl.java: Likewise. * java/nio/LongViewBufferImpl.java: Likewise. * java/nio/ShortViewBufferImpl.java: Likewise. * java/nio/ByteBuffer.java (endian): Make non-private so other java.nio classes can inherit it. (<init>): Don't bother clearing array_offset. * java/nio/ByteBuffer.java (allocate): Re-implement using wrap. * java/nio/ByteBuffer.java (get(byte[],int,int)): Check underflow. Remove redundant test. * java/nio/ByteBufferImpl.java (asCharBuffer, asShortBuffer, asIntBuffer, asLongBuffer, asFloatBuffer, asDoubleBuffer): Use new XxxViewBufferImpl constructors. * java/nio/MappedByteBufferImpl.java: Likewise. * java/nio/DirectByteBufferImpl.java: Likewise. * java/nio/ByteBufferImpl.java: Remove one constructor. Inline super in remaining constructor. * java/nio/ByteBuffer.java: Remove unused constructor. * java/nio/ByteBufferImpl.java (shiftDown): New optimized method. * java/nio/ByteBufferImpl.java (get, put): Add array_offset. * java/nio/DirectByteBufferImpl.java (owner): New field. (offset): Remove unused field. (<init>): Modify one and add another constructor. Change callers. (allocateDirect): Removed - not used. (getImpl, putImpl): Make static and pass address explicitly, to make them useful for MappedByteBufferImpl. (get, put): Check for underflow. Modify for new getImpl. (getImpl): New native method where target is array. (get(byte[],int,int)): Use the above. (adjustAddress): New static native method. (slice, duplicate, asReadOnly): New implementations. 2004-04-08 Per Bothner <per@bothner.com> * java/nio/ByteBuffer.java (shiftDown): New helper method. * java/nio/ByteBufferImpl.java (compact): Use new shiftDown method. * sava/nio/ByteBufferHelper.java: Remove redundant 'final' specifiers. Pass ByteOrder parameter to most methods, since the underlying ByteBuffer's order isn't always what we should use. * java/nio/ByteBufferImpl.java: Pass byte-order various places. * java/nio/DirectByteBufferImpl.java: Likewise. Use ByteBufferHelper methods. * java/nio/MappedByteBufferImpl.java: Likewise. (compact): Use shiftDown. * java/nio/CharViewBufferImpl.java (<init>): Pass byte-order. (get, put): Use ByteBufferHelper. (compact): Use new shiftDown method. (duplicate(boolean)): New helper method. (duplicate, asReadOnlyBuffer): Use it. (order): Return endian field. * java/nio/DoubleViewBufferImpl.java: Likewise. * java/nio/FloatViewBufferImpl.java: Likewise. * java/nio/IntViewBufferImpl.java: Likewise. * java/nio/LongViewBufferImpl.java: Likewise. * java/nio/ShortViewBufferImpl.java: Likewise. * java/nio/CharViewBufferImpl.java (subsequence): Redundant test. * java/nio/DirectByteBufferImpl.java (shiftDown): New native method. (compact): Re-implement using shiftDown.
* 2003-07-14 Michael Koch <konqueror@gmx.de>Michael Koch2003-07-141-1/+1
| | | | | | | | | | | | | | | | | * gnu/java/nio/FileChannelImpl.java: Removed. * gnu/java/nio/Makefile.am (EXTRA_DIST): Removed FileChannelImpl.java. * java/nio/channels/FileChannelImpl.java: New file. * java/nio/channels/Makefile.am (EXTRA_DIST): Added FileChannelImpl.java. * java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/RandomAccessFile.java, java/nio/MappedByteBufferImpl.java: Import java.nio.channels.FileChannelImpl instead of gnu.java.nio.FileChannelImpl. * java/nio/channels/FileChannel.java (MapMode.m): Made package-private.
* 2003-06-27 Michael Koch <konqueror@gmx.de>Michael Koch2003-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/RandomAccessFile.java, java/nio/ByteBufferImpl.java, java/nio/CharBufferImpl.java, java/nio/DirectByteBufferImpl.java, java/nio/DoubleBufferImpl.java, java/nio/FloatBufferImpl.java, java/nio/IntBufferImpl.java, java/nio/LongBufferImpl.java, java/nio/MappedByteBufferImpl.java, java/nio/ShortBufferImpl.java, java/rmi/server/SkeletonNotFoundException.java, java/rmi/server/UnicastRemoteObject.java, java/security/Certificate.java, java/security/cert/PolicyQualifierInfo.java, java/text/Format.java, javax/naming/CompositeName.java, javax/naming/CompoundName.java, javax/naming/InitialContext.java, javax/naming/LinkRef.java, javax/naming/NamingException.java, javax/naming/NamingSecurityException.java, javax/naming/ReferralException.java, javax/naming/StringRefAddr.java, javax/naming/directory/BasicAttribute.java, javax/naming/directory/BasicAttributes.java, javax/naming/ldap/UnsolicitedNotificationEvent.java, javax/security/auth/x500/X500Principal.java: New versions from libgcj.
* 2003-06-26 Michael Koch <konqueror@gmx.de>Michael Koch2003-06-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/nio/FileChannelImpl.java (write): Removed. * java/awt/font/GraphicAttribute.java (getAlignment): Made final. * java/awt/font/ImageGraphicAttribute.java (ImageGraphicAttribute): Made final. * java/awt/image/DataBufferByte.java (DataBufferByte): Made final. * java/awt/image/DataBufferInt.java (DataBufferInt): Made final. * java/awt/image/DataBufferUShort.java (DataBufferUShort): Made final. * java/awt/image/DirectColorModel.java (coerceData): Made final. * java/awt/image/PixelGrabber.java (status): Removed @deprecated tag. * java/beans/beancontext/BeanContextSupport.java (BCSIterator): Made final. * java/io/RandomAccessFile.java (readLine): Removed @deprecated tag. * java/net/Inet4Address.java (Inet4Address): Made package-private. * java/net/Inet6Address.java (Inet6Address): Made package-private. * java/nio/channels/FileChannel.java (write): Made final. * java/nio/channels/ServerSocketChannel.java (ServerSocketChannel): Made protected.
* 2003-05-18 Michael Koch <konqueror@gmx.de>Michael Koch2003-05-181-1/+1
| | | | | | | | | * java/io/DataOutputStream.java: New version from libgcj. * java/io/PrintWriter.java: Reformatted and moved class documentation. * java/io/RandomAccessFile.java (read): call in directly.
* 2003-05-15 Michael Koch <konqueror@gmx.de>Michael Koch2003-05-151-173/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/RandomAccessFile.java (out): New member variable. (in): Likewise. (buf): Removed. (RandomAccessFile): Handle mode "rwd". (read): Use in stream. (readBoolean): Likewise. (readByte): Likewise. (readDouble): Likewise. (readFloat): Likewise. (readUnsignedByte): Likewise. (write): Likewise. (writeBoolean): Likewise. (writeByte): Likewise. (writeFloat): Likewise. (writeDouble): Likewise. (writeBytes): Likewise. (writeChars): Likewise. (writeUTF): Likewise. (readChar): Use in stream, no need for being synchronized now. (readFully): Likewise. (readInt): Likewise. (readLine): Likewise. (readLong): Likewise. (readShort): Likewise. (readUnsignedShort): Likewise. (readUTF): Likewise. (writeShort): Likewise. (writeChar): Likewise. (writeInt): Likewise. (writeLong): Likewise. * java/io/FileDescriptor.java (DSYNC): New constant. * native/jni/java-io/FileDescriptor.c (DSYNC): New constant. (open): Handle new DSYNC constant.
* 2003-05-10 Michael Koch <konqueror@gmx.de>Michael Koch2003-05-101-4/+4
| | | | | | | * java/io/RandomAccessFile.java (RandomAccessFile): Reformatted. (setLength): Likewise. (length): Likewise.
* 2003-05-06 Michael Koch <konqueror@gmx.de>Michael Koch2003-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/DataOutputStream.java (write): Renamed argument to "value", merged documentation with libgcj. (writeBoolean): Likewise. (writeByte): Likewise. (writeShort): Likewise. (writeChar): Likewise. (writeInt): Likewise. (writeLong): Likewise. (writeFloat): Likewise. (writeDouble): Likewise. (writeBytes): Likewise. (writeChars):Likewise. (writeUTF): Likewise. * java/io/File.java: Reordered methods to match libgcj, some documentation merged from libgcj and reformatting of some code. * java/io/FileOutputStream.java (FileOutputStream): Merged from libgcj. * java/io/InputStreamReader.java: Merged copyright from libgcj. (InputStreamReader): Merged from libgcj. * java/io/RandomAccessFile.java (RandomAccessFile): Merged from libgcj.
* * include/java_io_FileDescriptor.h: Rebuilt.Tom Tromey2003-04-211-35/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/FileInputStream.java (FileInputStream): Updated for changes to FileDescriptor. (FileInputStream(FileDescriptor)): Don't throw SecurityException if fd is invalid. * java/io/FileOutputStream.java (FileOutputStream): Updated for changes to FileDescriptor. Don't throw SecurityException if fd is invalid. * java/io/RandomAccessFile.java (RandomAccessFile): Updated for changes to FileDescriptor. (readOnly): Removed; updated all users. * java/io/FileDescriptor.java (SET, CUR, END): Now constants. (READ, WRITE, APPEND, EXCL, SYNC): New constants. (in, out, err): Require nativeInit to initialize. (FileDescriptor(String,int)): New constructor. (open): Changed argument type of `mode'. Allow empty paths. Only throw runtime errors or FileNotFoundException. (nativeValid): Don't throw IOException. (valid): Simplified. (nativeOpen): Throw FileNotFoundException. Changed type of `mode' argument. * native/jni/java-io/FileDescriptor.c (Java_java_io_FileDescriptor_nativeValid): Updated comment. (SET, CUR, END, READ, WRITE, APPEND, EXCL, SYNC): New defines. (Java_java_io_FileDescriptor_nativeOpen): Changed type of mode argument. (true): Don't define; use JNI_TRUE. (false): Don't define; use JNI_FALSE. (INIT_FIELD): New define. (Java_java_io_FileDescriptor_nativeInit): Rewrote. * native/jni/java-io/java_io_FileDescriptor.c: Removed.
* 2003-04-06 Michael Koch <konqueror@gmx.de>Michael Koch2003-04-061-1/+1
| | | | | | | | | | | | | | | | | * gnu/java/nio/FileChannelImpl.java Mostly merged from libgcj. * gnu/java/nio/MappedByteFileBuffer.java, gnu/java/nio/MappedCharFileBuffer.java, gnu/java/nio/MappedDoubleFileBuffer.java, gnu/java/nio/MappedFloatFileBuffer.java, gnu/java/nio/MappedIntFileBuffer.java, gnu/java/nio/MappedLongFileBuffer.java, gnu/java/nio/MappedShortFileBuffer.java: Renamed address to map_address. * java/io/FileInputStream.java, java/io/FileOutputStream.java, java/io/RandomAccessFile.java: (getChannel): Merged from libgcj.
* 2003-03-31 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-311-319/+318
| | | | | | | | | * java/io/File.java: Reordered methods, reformatted code. * java/io/PrintStream.java: Reordered methods, reformatted code. * java/io/RandomAccessFile.java: Reordered methods, reformatted code.
* 2003-03-28 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-281-14/+12
| | | | | | | | | | | | | | * java/io/File.java: Merged comment from libgcj. (serialVersionUID): Made it private. * java/io/ObjectOutputStream.java (PutField.write): Documentation reformatted. * java/io/PrintStream.java: Merged comment from libgcj. (PrintStream): Reformatted. * java/io/RandomAccessFile.java (RandomAccessFile): Merged with libgcj. (read): Likewise.
* 2003-03-28 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-281-47/+56
| | | | | | | | | | | | | * java/io/File.java: Merged authors with libgcj, reformatted. * java/io/FileOutputStream.java: Merged authors with libgcj, reformatted. (FileOutputStream): Partly merged with libgcj. (finalize): New dummy method to make API complete. (write): Added argument check from libgcj. * java/io/RandomAccessFile.java: Merged authors with libgcj, reformatted. (read*): Throws only IOException.
* 2003-03-25 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-251-2/+2
| | | | | | * java/io/RandomAccessFile.java (length): Replace length() with getLength(). (read): Replace in with fd.
* 2003-03-24 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-241-38/+43
| | | | | * java/io/RandomAccessFile.java: More little merges with libgcj.
* 2003-03-24 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-241-69/+69
| | | | | | | | | | | | | | | | | * java/io/File.java: Merged copyright from libgcj. * java/io/FileInputStream.java (close): Merged implementation from libgcj. (finalize): Merged from libgcj for API completeness. (seek): Partly merged from libgcj. * java/io/InputStreamReader.java: Moving of some methods to match the order in libgcj and reformatting. * java/io/OutputStreamWriter.java: Moving of some methods to match the order in libgcj and reformatting. * java/io/PrintStream.java: Moving of some methods to match the order in libgcj and reformatting. * java/io/RandomAccessFile.java: Moving of some methods to match the order in libgcj and reformatting.
* 2003-03-24 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-241-1/+1
| | | | | | | | | | | | | | | | * java/io/DataOutputStream.java: Reordered methods to match libgcj, reformatting. (writeBoolean): Replaced if ... else ... with a single line of code. * java/io/FileInputStream.java: Reordered methods to match libgcj, reformatting. * java/io/FileOutputStream.java: Reordered methods to match libgcj, reformatting. * java/io/InputStreamReader.java: Merged copyright years with libgcj. * java/io/OutputStreamWriter.java: Merged copyright years with libgcj. * java/io/RandomAccessFile.java: Merged copyright years with libgcj.
* 2003-03-23 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-231-12/+7
| | | | | | | | | * java/io/FileInputStream.java (getChannel): Make it synchronized, rewrote implementation. * java/io/FileOutputStream.java (getChannel): Make it synchronized, rewrote implementation. * java/io/RandomAccessFile.java (getChannel): Make it synchronized, rewrote implementation.
* 2003-03-23 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-231-698/+603
| | | | | | * java/io/ObjectOutputStream.java, java/io/RandomAccessFile.java: Reformated.
* 2003-03-23 Michael Koch <konqueror@gmx.de>Michael Koch2003-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * java/io/ByteArrayOutputStream.java (size): Fixed @see tag. * java/io/CharArrayWriter.java (size): Fixed @see tag. * java/io/DataInputStream.java (readUTF): Fixed typo in @return tag. * java/io/DataOutputStream.java (writeFloat): Fixed @see tag. (writeDouble): Fixed @see tag. * java/io/FilePermission.java (FilePermission): Replaced @XXX with FIXME to make javadoc happy. * java/io/LineNumberInputStream.java (LineNumberInputStream): Replaced @code with html tags. (getLineNumber): Fixed typo @return tag. * java/io/LineNumberReader.java (getLineNumber): Fixed typo @return tag. * java/io/PushbackReader.java (PushbackReader): Replaced @code with @param. * java/io/RandomAccessFile.java (writeInt): Fixed @see tag. (writeDouble): Fixed @see tag. * java/io/StreamTokenizer.java (writeDouble): Fixed @see tag.
* * java/io/RandomAccessFile - Fix 1.4 compatibility problemsAaron M. Renn2003-03-151-16/+21
| | | | | | | (RandomAccessFile(File, String)) - Delete implementation, call RandomAccessFile(String, String), throw FileNotFound instead of IOExcep (RandomAccessFile(String, String) - Add implementation copied from other constructor, make throw FileNotFound instead of IOException
* * java/io/FileOutputStream.javaAaron M. Renn2003-03-091-3/+2
| | | | | | | | | | (FileOutputStream(String,boolean)) Open write only * java/io/FileDescriptor.java (open) Support new open modes "w" & "a", change "ra" to "rwa" * java/io/RandomAccessFile.java (RandomAccessFile(String,String)) Always do checkRead on open * native/jni/java-io/FileDescriptor.c (nativeOpen) Support new open modes "w" "a", change "ra" to "rwa"
* Converted file based I/O mechanisms in java.io to newAaron M. Renn2003-03-041-146/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | native provider interface. All native methods are now in the FileDescriptor class. * java/io/FileDescriptor.java Re-indent code and fix word-wrapped comments. native_fd Rename instance variable to nativeFd Commence primary ignition.... getFileDescriptor(int) Diked out. (setNativeFD) Rename to setNativeFd, make private (getNativeFD) Rename to getNativeFd (syncInternal) Rename to nativeSync(long) (validInternal) Rename to nativeValid (long) New instance methods added: open(String, String) close() write(byte) write(byte[], long, long) read() read(byte[], long, long) available() seek() getFilePointer() getLength() setLength() nativeOpen() nativeClose() nativeWriteByte() nativeWriteBuf() nativeReadByte() nativeReadBuf() nativeAvailable() nativeSeek() nativeGetFilePointer() nativeGetLength() nativeSetLength() Added new static methods nativeInit() * java/io/FileInputStream.java Re-ident code and fix word-wrapped comments. native_fd - Convert from int to FileDescriptor, rename fd FileInputStream(String) - Use string directly, don't convert to File and call overloaded constructor FileInputStream(File) - Call getPath, then invoke overloaded constructor (getFD) - Just return fd (available) - Just call fd.available() (skip) - Convert to use fd.seek() (read) - Use fd.read() (read(byte[])) - Use fd.read(byte[], long, long) (close) - Use fd.close() (getChannel) - Use fd.getNativeFd() Commence primary ignition.... grand_total_read instance variable skipInternal readInternal open closeInternal finalize static initializer block Diked out. * java/io/FileOutputStream.java native_fd - Convert to FileDescriptor and rename fd (getFD) - Just return fd (write) - Use fd.write() (write(byte[], long, long) - Use fd.write(byte[], long, long) (close) - Use fd.close() (getChannel) - Use fd.getNativeFd() Commence primary ignition.... writeInternal open closeInternal finalize static initializer block Diked out. * java/io/RandomAccessFile.java native_fd - Convert to FileDescriptor and rename fd (RandomAccessFile(File, String)) - Add modes "rws" and "rwd" (getFD) - Just return fd (getFilePointer) - Use fd.getFilePointer() (length) - Use fd.length() (seek) - Use fd.seek() (setLength) - Use fd.setLength() (read) - Use fd.read() (write) - Use fd.write() (skipBytes) - Use fd.getFilePointer() and fd.seek() (getChannel) - Use fd.getNativeFd() Commence primary ignition .... closeInternal getFilePointerInternal lengthInternal seekInternal setLengthInternal readInternal skipInternal writeInternal static initializer block Diked Out. * native/jni/java-io/FileDescriptor.c New C module implementing all native methods from FileDescriptor * native/jni/java-io/Makefile.am Use new FileDescriptor.c instead of old modules * native/jni/java-io/java_io_FileDescriptor.c No longer used * native/jni/java-io/java_io_FileInputStream.c No longer used * native/jni/java-io/java_io_FileOutputStream.c No longer used * native/jni/java-io/java_io_RandomAccessFile.c No longer used.
* DataInputStream:Aaron M. Renn2003-03-021-1190/+1220
| | | | | | | | | | | | | | | | | | | o Fix word-wrapped comments o Remove all convert* methods except UTF and inline functionality o Add synchronization on shared buffer utilization DataOutputStream o Remove all convert* methods except UTF and inline functionality o Adopt shared conversion buffer approach a la DataInputStream Synchronize accordingly o Re-indent code o Eliminate word-wrapped comments RandomAccessFile o Inline converter functionality previously supplied by static methods in Data{Input,Output}Stream - except UTF conversion o Re-ident code o Eliminate word-wrapped comments
* java/io/RandomAccessFile: corrected skipBytes() to stop at EOFDaryl Lee2002-12-271-2/+5
|
* * java/io/FileInputStream (close): Check native_fd != -1.Mark Wielaard2002-10-271-1/+4
| | | | | * java/io/FileOutputStream.java (close): Likewise. * java/io/RandomAccessFile.java (close): Likewise.
* - basic nio apps now workRonald Veldema2002-04-081-0/+26
| | | | - removed old Accessible, now use new javax.Accessibility
* * java/io/RandomAccessFile.java (read(byte[],int,int): fix a bug inMark Wielaard2002-02-151-1/+1
| | | | calling readInternal, use offset and len.
* Add License clarificationMark Wielaard2002-01-221-5/+16
|
* * gnu/Makefile.am: removed tools from SUBDIRSBrian Jones2001-09-211-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/awt/image/GdkPixbufDecoder.java: wrapped loadLibrary call within if (Configuration.INIT_LOAD_LIBRARY) * gnu/java/awt/peer/gtk/GtkToolkit.java: same * java/io/File.java: same * java/io/FileDescriptor.java: same * java/io/FileInputStream.java: same * java/io/FileOutputStream.java: same * java/io/ObjectInputStream.java: same * java/io/ObjectOutputStream.java: same * java/io/ObjectStreamClass.java: same * java/io/RandomAccessFile.java: same * java/lang/Double.java: same * java/lang/Float.java: same * java/lang/Math.java: same * java/lang/Object.java: same * java/lang/System.java: same * java/lang/reflect/Array.java: same * java/math/BigInteger.java: same * java/net/InetAddress.java: same * java/net/PlainDatagramSocketImpl.java: same * java/net/PlainSocketImpl.java: same * java/util/ResourceBundle.java: same * java/util/TimeZone.java: same * vm/reference/java/lang/Throwable.java: remove unused loadLibrary call, VMs typically statically link these native methods instead.
* Change license to libgcc-like terms.Paul Fisher2000-03-161-19/+25
| | | | Fix copyright years.
* Ensure we always return -1 on end of fileAaron M. Renn1998-12-311-3/+11
|
* Ensure javaio native library loadedAaron M. Renn1998-12-271-11/+9
|
* Remove 'final' keyword from skipBytes method declAaron M. Renn1998-12-021-2/+2
|
* \uxxxx HTML reference is &#92;uxxxxBrian Jones1998-11-301-4/+4
|
* Documentation FixAaron M. Renn1998-11-291-140/+140
|
* Initial CheckinAaron M. Renn1998-08-011-0/+1199