Skip to content

Commit 42330d2

Browse files
author
Brian Burkhalter
committed
8029370: (fc) FileChannel javadoc not clear for cases where position == size
Reviewed-by: lancea
1 parent a253b46 commit 42330d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/java.base/share/classes/java/nio/channels/FileChannel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -633,7 +633,7 @@ public final long write(ByteBuffer[] srcs) throws IOException {
633633
* bytes free in its output buffer.
634634
*
635635
* <p> This method does not modify this channel's position. If the given
636-
* position is greater than the file's current size then no bytes are
636+
* position is greater than or equal to the file's current size then no bytes are
637637
* transferred. If the target channel has a position then bytes are
638638
* written starting at that position and then the position is incremented
639639
* by the number of bytes written.
@@ -761,7 +761,7 @@ public abstract long transferFrom(ReadableByteChannel src,
761761
* #read(ByteBuffer)} method, except that bytes are read starting at the
762762
* given file position rather than at the channel's current position. This
763763
* method does not modify this channel's position. If the given position
764-
* is greater than the file's current size then no bytes are read. </p>
764+
* is greater than or equal to the file's current size then no bytes are read. </p>
765765
*
766766
* @param dst
767767
* The buffer into which bytes are to be transferred
@@ -806,7 +806,7 @@ public abstract long transferFrom(ReadableByteChannel src,
806806
* #write(ByteBuffer)} method, except that bytes are written starting at
807807
* the given file position rather than at the channel's current position.
808808
* This method does not modify this channel's position. If the given
809-
* position is greater than the file's current size then the file will be
809+
* position is greater than or equal to the file's current size then the file will be
810810
* grown to accommodate the new bytes; the values of any bytes between the
811811
* previous end-of-file and the newly-written bytes are unspecified. </p>
812812
*

0 commit comments

Comments
 (0)