Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
a3cc5f17
Commit
a3cc5f17
authored
Mar 03, 2009
by
The Android Open Source Project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto import from //depot/cupcake/@132589
parent
bb7bbd7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
38 deletions
+4
-38
ProtoBuf.java
src/com/google/common/io/protocol/ProtoBuf.java
+4
-38
No files found.
src/com/google/common/io/protocol/ProtoBuf.java
View file @
a3cc5f17
...
...
@@ -144,28 +144,6 @@ public class ProtoBuf {
insertProtoBuf
(
tag
,
getCount
(
tag
),
value
);
}
/**
* Adds a new protobuf for the specified tag, setting the child protobuf's
* type correctly for the tag.
* @param tag the tag for which to create a new protobuf
* @return the newly created protobuf
*/
public
ProtoBuf
addNewProtoBuf
(
int
tag
)
{
ProtoBuf
child
=
newProtoBufForTag
(
tag
);
addProtoBuf
(
tag
,
child
);
return
child
;
}
/**
* Creates and returns a new protobuf for the specified tag, setting the new
* protobuf's type correctly for the tag.
* @param tag the tag for which to create a new protobuf
* @return the newly created protobuf
*/
public
ProtoBuf
newProtoBufForTag
(
int
tag
)
{
return
new
ProtoBuf
((
ProtoBufType
)
msgType
.
getData
(
tag
));
}
/**
* Appends the given (repeated) tag with the given String value.
*/
...
...
@@ -203,7 +181,7 @@ public class ProtoBuf {
return
(
byte
[])
getObject
(
tag
,
index
,
ProtoBufType
.
TYPE_DATA
);
}
/**
/**
* Returns the integer value for the given tag.
*/
public
int
getInt
(
int
tag
)
{
...
...
@@ -218,7 +196,7 @@ public class ProtoBuf {
ProtoBufType
.
TYPE_INT32
)).
longValue
();
}
/**
/**
* Returns the long value for the given tag.
*/
public
long
getLong
(
int
tag
)
{
...
...
@@ -260,7 +238,7 @@ public class ProtoBuf {
return
Double
.
longBitsToDouble
(
getLong
(
tag
,
index
));
}
/**
/**
* Returns the group or nested message for the given tag.
*/
public
ProtoBuf
getProtoBuf
(
int
tag
)
{
...
...
@@ -291,7 +269,7 @@ public class ProtoBuf {
return
(
String
)
getObject
(
tag
,
index
,
ProtoBufType
.
TYPE_TEXT
);
}
/**
/**
* Returns the type definition of this protocol buffer or group -- if set.
*/
public
ProtoBufType
getType
()
{
...
...
@@ -751,18 +729,6 @@ public class ProtoBuf {
setObject
(
tag
,
pb
);
}
/**
* Sets a new protobuf for the specified tag, setting the child protobuf's
* type correctly for the tag.
* @param tag the tag for which to create a new protobuf
* @return the newly created protobuf
*/
public
ProtoBuf
setNewProtoBuf
(
int
tag
)
{
ProtoBuf
child
=
newProtoBufForTag
(
tag
);
setProtoBuf
(
tag
,
child
);
return
child
;
}
/**
* Sets the given tag to the given String value.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment