Skip to content

Commit

Permalink
putIntLE
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jan 13, 2025
1 parent 296a7c3 commit e4790b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java
Original file line number Diff line number Diff line change
Expand Up @@ -3001,16 +3001,16 @@ public final int flushTo(OutputStream out, Charset charset) throws IOException {
}

static void writeEscapedChar(byte[] bytes, int off, int c0) {
putShortLE(bytes, off, ESCAPED_CHARS[c0 & 0x7f]);
IOUtils.putShortLE(bytes, off, ESCAPED_CHARS[c0 & 0x7f]);
}

static void writeU4Hex2(byte[] bytes, int off, int c) {
putIntUnaligned(bytes, off, U4);
putShortUnaligned(bytes, off + 4, hex2(c));
IOUtils.putIntUnaligned(bytes, off, U4);
IOUtils.putShortLE(bytes, off + 4, hex2(c));
}

static void writeU4HexU(byte[] bytes, int off, int c) {
putShortUnaligned(bytes, off, U2);
putIntUnaligned(bytes, off + 2, hex4U(c));
IOUtils.putShortUnaligned(bytes, off, U2);
IOUtils.putIntLE(bytes, off + 2, hex4U(c));
}
}

0 comments on commit e4790b8

Please sign in to comment.