protobuf
java
core
src
main
java
com
google
protobuf
MessageLite.java
Go to the documentation of this file.
1
// Protocol Buffers - Google's data interchange format
2
// Copyright 2008 Google Inc. All rights reserved.
3
// https://developers.google.com/protocol-buffers/
4
//
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are
7
// met:
8
//
9
// * Redistributions of source code must retain the above copyright
10
// notice, this list of conditions and the following disclaimer.
11
// * Redistributions in binary form must reproduce the above
12
// copyright notice, this list of conditions and the following disclaimer
13
// in the documentation and/or other materials provided with the
14
// distribution.
15
// * Neither the name of Google Inc. nor the names of its
16
// contributors may be used to endorse or promote products derived from
17
// this software without specific prior written permission.
18
//
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
// TODO(kenton): Use generics? E.g. Builder<BuilderType extends Builder>, then
32
// mergeFrom*() could return BuilderType for better type-safety.
33
34
package
com.google.protobuf;
35
36
import
java
.io.IOException;
37
import
java
.io.InputStream;
38
import
java
.io.OutputStream;
39
65
public
interface
MessageLite
extends
MessageLiteOrBuilder
{
66
71
void
writeTo
(
CodedOutputStream
output
)
throws
IOException;
72
77
int
getSerializedSize
();
78
80
Parser<? extends MessageLite>
getParserForType
();
81
82
// -----------------------------------------------------------------
83
// Convenience methods.
84
89
ByteString
toByteString
();
90
95
byte
[]
toByteArray
();
96
108
void
writeTo
(OutputStream
output
)
throws
IOException;
109
117
void
writeDelimitedTo
(OutputStream
output
)
throws
IOException;
118
119
120
// =================================================================
121
// Builders
122
124
Builder
newBuilderForType
();
125
130
Builder
toBuilder
();
131
133
interface
Builder
extends
MessageLiteOrBuilder
, Cloneable {
135
Builder
clear
();
136
145
MessageLite
build
();
146
152
MessageLite
buildPartial
();
153
159
Builder
clone
();
160
178
Builder
mergeFrom
(
CodedInputStream
input
)
throws
IOException;
179
185
Builder
mergeFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry)
186
throws
IOException;
187
188
// ---------------------------------------------------------------
189
// Convenience methods.
190
197
Builder
mergeFrom
(
ByteString
data
)
throws
InvalidProtocolBufferException
;
198
205
Builder
mergeFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry)
206
throws
InvalidProtocolBufferException
;
207
214
Builder
mergeFrom
(
byte
[]
data
)
throws
InvalidProtocolBufferException
;
215
222
Builder
mergeFrom
(
byte
[]
data
,
int
off,
int
len
)
throws
InvalidProtocolBufferException
;
223
230
Builder
mergeFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry)
231
throws
InvalidProtocolBufferException
;
232
239
Builder
mergeFrom
(
byte
[]
data
,
int
off,
int
len
,
ExtensionRegistryLite
extensionRegistry)
240
throws
InvalidProtocolBufferException
;
241
254
Builder
mergeFrom
(InputStream
input
)
throws
IOException;
255
263
Builder
mergeFrom
(InputStream
input
,
ExtensionRegistryLite
extensionRegistry)
264
throws
IOException;
265
282
Builder
mergeFrom
(
MessageLite
other);
283
292
boolean
mergeDelimitedFrom
(InputStream
input
)
throws
IOException;
293
295
boolean
mergeDelimitedFrom
(InputStream
input
,
ExtensionRegistryLite
extensionRegistry)
296
throws
IOException;
297
}
298
}
com.google.protobuf.MessageLite.Builder.clear
Builder clear()
input
std::string input
Definition:
tokenizer_unittest.cc:197
com.google.protobuf.MessageLite.writeDelimitedTo
void writeDelimitedTo(OutputStream output)
com.google.protobuf.MessageLiteOrBuilder
Definition:
MessageLiteOrBuilder.java:39
com.google.protobuf.MessageLite.Builder.build
MessageLite build()
com.google.protobuf.Parser
Definition:
Parser.java:47
com.google.protobuf.CodedInputStream
Definition:
CodedInputStream.java:61
com.google.protobuf.MessageLite.Builder.buildPartial
MessageLite buildPartial()
com.google.protobuf.MessageLite.Builder
Definition:
MessageLite.java:133
com.google.protobuf.ExtensionRegistryLite
Definition:
ExtensionRegistryLite.java:70
com.google.protobuf.MessageLite.newBuilderForType
Builder newBuilderForType()
com.google.protobuf.MessageLite.Builder.clone
Builder clone()
java
com.google.protobuf.MessageLite.toByteString
ByteString toByteString()
len
int len
Definition:
php/ext/google/protobuf/map.c:206
com.google.protobuf.MessageLite.toBuilder
Builder toBuilder()
com.google.protobuf.MessageLite.Builder.mergeDelimitedFrom
boolean mergeDelimitedFrom(InputStream input)
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition:
glcorearb.h:2879
com.google.protobuf.CodedOutputStream
Definition:
CodedOutputStream.java:59
com.google.protobuf.InvalidProtocolBufferException
Definition:
InvalidProtocolBufferException.java:41
com.google.protobuf.MessageLite.Builder.mergeFrom
Builder mergeFrom(CodedInputStream input)
output
const upb_json_parsermethod const upb_symtab upb_sink * output
Definition:
ruby/ext/google/protobuf_c/upb.h:10503
com.google.protobuf.MessageLite.toByteArray
byte[] toByteArray()
com.google.protobuf.MessageLite.writeTo
void writeTo(CodedOutputStream output)
com.google.protobuf.MessageLite.getSerializedSize
int getSerializedSize()
com.google.protobuf.MessageLite
Definition:
MessageLite.java:65
com.google.protobuf.ByteString
Definition:
ByteString.java:67
com.google.protobuf.MessageLite.getParserForType
Parser<? extends MessageLite > getParserForType()
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:56