javadoc: clarify exception that can be thrown from ut8 conversion

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@948788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-05-27 11:28:49 +00:00
parent 6ae79d9b3f
commit 1c6a43c647
1 changed files with 3 additions and 2 deletions

View File

@ -26,8 +26,9 @@ public class ByteUtils {
/** Converts utf8 to utf16 and returns the number of 16 bit Java chars written. /** Converts utf8 to utf16 and returns the number of 16 bit Java chars written.
* Full characters are read, even if this reads past the length passed (and can result in * Full characters are read, even if this reads past the length passed (and can result in
* an exception if invalid UTF8 is passed). * an ArrayOutOfBoundsException if invalid UTF8 is passed). Explicit checks for valid UTF8 are not performed.
* The char[] out should probably have enough room to hold the worst case of each byte becoming a Java char. */ * The char[] out should probably have enough room to hold the worst case of each byte becoming a Java char.
*/
public static int UTF8toUTF16(byte[] utf8, int offset, int len, char[] out, int out_offset) { public static int UTF8toUTF16(byte[] utf8, int offset, int len, char[] out, int out_offset) {
int out_start = out_offset; int out_start = out_offset;