diff options
author | 2013-10-18 01:40:56 -0700 | |
---|---|---|
committer | 2013-10-18 01:40:56 -0700 | |
commit | a4c21cad60e12f0fa33a70e372f0f51e20c6c484 (patch) | |
tree | 8be82947168b0b7789734ca48b0d8468bb4eaff4 /java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java | |
parent | 1dbc930c0f8d4bf9bd6e4b46c7499261ef27f6b0 (diff) | |
parent | 19b247e79da7feba9c7b75900f090e7c325f47f4 (diff) | |
download | latinime-a4c21cad60e12f0fa33a70e372f0f51e20c6c484.tar.gz latinime-a4c21cad60e12f0fa33a70e372f0f51e20c6c484.tar.xz latinime-a4c21cad60e12f0fa33a70e372f0f51e20c6c484.zip |
am 19b247e7: Fix the name of the argument of writeString.
* commit '19b247e79da7feba9c7b75900f090e7c325f47f4':
Fix the name of the argument of writeString.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java index 9f1af0192..8a8ceaa8c 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java @@ -208,8 +208,7 @@ public final class BinaryDictDecoderUtils { * @param word the string to write. * @return the size written, in bytes. */ - static int writeString(final byte[] buffer, final int origin, - final String word) { + static int writeString(final byte[] buffer, final int origin, final String word) { final int length = word.length(); int index = origin; for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) { @@ -231,26 +230,26 @@ public final class BinaryDictDecoderUtils { * * This will also write the terminator byte. * - * @param buffer the OutputStream to write to. + * @param stream the OutputStream to write to. * @param word the string to write. * @return the size written, in bytes. */ - static int writeString(final OutputStream buffer, final String word) throws IOException { + static int writeString(final OutputStream stream, final String word) throws IOException { final int length = word.length(); int written = 0; for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) { final int codePoint = word.codePointAt(i); final int charSize = getCharSize(codePoint); if (1 == charSize) { - buffer.write((byte) codePoint); + stream.write((byte) codePoint); } else { - buffer.write((byte) (0xFF & (codePoint >> 16))); - buffer.write((byte) (0xFF & (codePoint >> 8))); - buffer.write((byte) (0xFF & codePoint)); + stream.write((byte) (0xFF & (codePoint >> 16))); + stream.write((byte) (0xFF & (codePoint >> 8))); + stream.write((byte) (0xFF & codePoint)); } written += charSize; } - buffer.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR); + stream.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR); written += FormatSpec.PTNODE_TERMINATOR_SIZE; return written; } |