<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java Reference on Protocol Buffers Documentation</title><link>https://protobuf.dev/reference/java/</link><description>Recent content in Java Reference on Protocol Buffers Documentation</description><generator>Hugo</generator><language>en</language><atom:link href="https://protobuf.dev/reference/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Java Generated Code Guide</title><link>https://protobuf.dev/reference/java/java-generated/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://protobuf.dev/reference/java/java-generated/</guid><description>Any differences between proto2, proto3, and Editions generated code are highlighted—note that these differences are in the generated code as described in this document, not the base message classes/interfaces, which are the same in all versions. You should read the proto2 language guide, proto3 language guide, and/or Editions language guide before reading this document.
Note that no Java protocol buffer methods accept or return nulls unless otherwise specified.
Compiler Invocation The protocol buffer compiler produces Java output when invoked with the --java_out= command-line flag.</description></item><item><title>UTF-8 Validation in Java</title><link>https://protobuf.dev/reference/java/java-utf8-validation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://protobuf.dev/reference/java/java-utf8-validation/</guid><description>.
Proto2 has both string and bytes, and from the beginning it was documented that strings must always contain UTF-8 encoded text. Enforcement of this requirement varies from language to language (details later in this topic), which means that in practice, many string fields contain non-UTF-8 data despite what the spec says.
For proto3 it was decided that all parsers must validate UTF-8. This decision came almost a year after proto3 had debuted in google3, so this change required a project to set enforce_utf8=false on all existing string fields before flipping the default to enforce_utf8=true.</description></item><item><title>Java Proto Names</title><link>https://protobuf.dev/reference/java/java-proto-names/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://protobuf.dev/reference/java/java-proto-names/</guid><description>This document contains information on what the fully-qualified Java name of a proto is, based on the different proto options. This name corresponds to the package you need to import to use that message.
Recommendation Starting with Edition 2024, best practice is to:
Set option java_package = &amp;quot;com.example.package&amp;quot; Do not set java_outer_classname or features.(pb.java).nest_in_file_class = YES. Starting with Edition 2024, the default behaviors have otherwise been improved so that now the default behavior is considered current best practice.</description></item><item><title>Java API</title><link>https://protobuf.dev/reference/java/api-docs-link/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://protobuf.dev/reference/java/api-docs-link/</guid><description/></item></channel></rss>