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
71f203a1
Commit
71f203a1
authored
Nov 22, 2010
by
Charles Stanhope
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added CodedInputStream ctor symmetrical with CodedOutputStream.
committer: Arnold Zokas <arnold.zokas@coderoom.net>
parent
89694ecc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
CodedInputStream.cs
src/ProtocolBuffers/CodedInputStream.cs
+12
-3
No files found.
src/ProtocolBuffers/CodedInputStream.cs
View file @
71f203a1
...
@@ -105,12 +105,21 @@ namespace Google.ProtocolBuffers {
...
@@ -105,12 +105,21 @@ namespace Google.ProtocolBuffers {
/// byte array.
/// byte array.
/// </summary>
/// </summary>
public
static
CodedInputStream
CreateInstance
(
byte
[]
buf
)
{
public
static
CodedInputStream
CreateInstance
(
byte
[]
buf
)
{
return
new
CodedInputStream
(
buf
);
return
new
CodedInputStream
(
buf
,
0
,
buf
.
Length
);
}
}
private
CodedInputStream
(
byte
[]
buffer
)
{
/// <summary>
/// Creates a new CodedInputStream that reads from the given
/// byte array slice.
/// </summary>
public
static
CodedInputStream
CreateInstance
(
byte
[]
buf
,
int
offset
,
int
length
)
{
return
new
CodedInputStream
(
buf
,
offset
,
length
);
}
private
CodedInputStream
(
byte
[]
buffer
,
int
offset
,
int
length
)
{
this
.
buffer
=
buffer
;
this
.
buffer
=
buffer
;
this
.
bufferSize
=
buffer
.
Length
;
this
.
bufferPos
=
offset
;
this
.
bufferSize
=
offset
+
length
;
this
.
input
=
null
;
this
.
input
=
null
;
}
}
...
...
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