Skip to content
JackSparrow414

Encoding and Decoding in Java

Character-byte conversion and the encoding and decoding process in Java.

2 posts · In reading order

  1. Java Character Encoding and Decoding (Part 1)

    Using String.getBytes as an example, this article traces how Java looks up a character set, creates an encoder, and converts a string to a byte array. It also outlines the similar process used to decode bytes into characters.

  2. Java Character Encoding and Decoding (Part 2): URL Encoding

    This article traces URL encoding and decoding in Java through URLEncoder, URLDecoder, and Charset lookup. It explains hexadecimal byte representation in percent-encoded URLs and briefly introduces chunked transfer through examples of request and response headers.