comparison src/java.base/share/classes/java/nio/X-Buffer-bin.java.template @ 12418:950f14c10fc9

8065570: (bf spec) ByteBuffer.slice() should make it clear that the initial order is BIG_ENDIAN Summary: Refine documentation of allocate*(), wrap(), slice(), duplicate(), asReadOnlyBuffer(), and as{Type}Buffer() to explcitly state the byte order of the created buffer. Reviewed-by: alanb
author bpb
date Wed, 15 Jul 2015 10:43:07 -0700
parents f08705540498
children 6f3a2d6e646b
comparison
equal deleted inserted replaced
0:e529d7fc5d02 1:e618a2939755
1 /* 1 /*
2 * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
117 * buffer, and vice versa; the two buffers' position, limit, and mark 117 * buffer, and vice versa; the two buffers' position, limit, and mark
118 * values will be independent. 118 * values will be independent.
119 * 119 *
120 * <p> The new buffer's position will be zero, its capacity and its limit 120 * <p> The new buffer's position will be zero, its capacity and its limit
121 * will be the number of bytes remaining in this buffer divided by 121 * will be the number of bytes remaining in this buffer divided by
122 * $nbytes$, and its mark will be undefined. The new buffer will be direct 122 * $nbytes$, its mark will be undefined, and its byte order will be that
123 * if, and only if, this buffer is direct, and it will be read-only if, and 123 * of the byte buffer at the moment the view is created. The new buffer
124 * only if, this buffer is read-only. </p> 124 * will be direct if, and only if, this buffer is direct, and it will be
125 * read-only if, and only if, this buffer is read-only. </p>
125 * 126 *
126 * @return A new $type$ buffer 127 * @return A new $type$ buffer
127 */ 128 */
128 public abstract $Type$Buffer as$Type$Buffer(); 129 public abstract $Type$Buffer as$Type$Buffer();
129 130