FIND YOUR NEXT FEW LINES

Results for “Encoding & structured values”

Small, practical examples. Search by task or narrow things down below.

391 snippets foundClear filters
JavaEncoding & structured values

Calculate a SHA-256 content digest

Java: Hash UTF-8 bytes and format the result as lowercase hexadecimal.

Java✓ Tested
JavaEncoding & structured values

Convert bytes to hexadecimal and back

Java: Use HexFormat for a standard-library representation of raw bytes.

Java✓ Tested
JavaEncoding & structured values

Decode a form query parameter

Java: URLDecoder reverses form encoding and treats plus as a space.

Java✓ Tested
JavaEncoding & structured values

Encode a form query parameter

Java: URLEncoder uses application/x-www-form-urlencoded rules, including plus signs for spaces.

Java✓ Tested
JavaEncoding & structured values

Encode and decode Base64 bytes

Java: Convert through UTF-8 explicitly before and after Base64 encoding.

Java✓ Tested
JavaEncoding & structured values

Inspect components of a URI

Java: Use URI parsing instead of splitting a URL at punctuation manually.

Java✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
JavaEncoding & structured values

Parse a UUID and inspect its version

Java: Use UUID.fromString for a standard UUID value.

Java✓ Tested
JavaEncoding & structured values

Read a big-endian integer from bytes

Java: Set a byte order explicitly when handling a binary protocol.

Java✓ Tested
JavaEncoding & structured values

Write and read typed binary fields

Java: Data streams use a matching write/read order and fixed encodings for Java primitive values.

Java✓ Tested
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested
JavaScriptRegular expressions & URL encoding

Build a URL query string from values

JavaScript: URLSearchParams handles query escaping and repeated parameter appends.

JavaScript✓ Tested