74 |
* @exception IndexOutOfBoundsException If the preconditions on the offset |
* @exception IndexOutOfBoundsException If the preconditions on the offset |
75 |
* and length parameters do not hold |
* and length parameters do not hold |
76 |
*/ |
*/ |
77 |
final public static CharBuffer wrap(char[] array, int offset, int length) |
public static final CharBuffer wrap(char[] array, int offset, int length) |
78 |
{ |
{ |
79 |
return new CharBufferImpl(array, 0, array.length, offset + length, offset, -1, false); |
return new CharBufferImpl(array, 0, array.length, offset + length, offset, -1, false); |
80 |
} |
} |
86 |
* |
* |
87 |
* @return a new <code>CharBuffer</code> object |
* @return a new <code>CharBuffer</code> object |
88 |
*/ |
*/ |
89 |
final public static CharBuffer wrap(CharSequence seq) |
public static final CharBuffer wrap(CharSequence seq) |
90 |
{ |
{ |
91 |
return wrap(seq, 0, seq.length()); |
return wrap(seq, 0, seq.length()); |
92 |
} |
} |
103 |
* @exception IndexOutOfBoundsException If the preconditions on the offset |
* @exception IndexOutOfBoundsException If the preconditions on the offset |
104 |
* and length parameters do not hold |
* and length parameters do not hold |
105 |
*/ |
*/ |
106 |
final public static CharBuffer wrap(CharSequence seq, int start, int end) |
public static final CharBuffer wrap(CharSequence seq, int start, int end) |
107 |
{ |
{ |
108 |
// FIXME: implement better handling of java.lang.String. |
// FIXME: implement better handling of java.lang.String. |
109 |
// Probably share data with String via reflection. |
// Probably share data with String via reflection. |
131 |
* |
* |
132 |
* @return a new <code>CharBuffer</code> object |
* @return a new <code>CharBuffer</code> object |
133 |
*/ |
*/ |
134 |
final public static CharBuffer wrap(char[] array) |
public static final CharBuffer wrap(char[] array) |
135 |
{ |
{ |
136 |
return wrap(array, 0, array.length); |
return wrap(array, 0, array.length); |
137 |
} |
} |