it works
This commit is contained in:
parent
a43b40fe7a
commit
b46aa2ba92
2 changed files with 4 additions and 2 deletions
|
@ -23,7 +23,9 @@ public class AddressbookMain {
|
|||
|
||||
Person.Builder alice = people.get(0);
|
||||
alice.setId(123);
|
||||
|
||||
alice.setName(new Text.Reader("Alice"));
|
||||
|
||||
alice.setEmail(new Text.Reader("alice@example.com"));
|
||||
|
||||
StructList.Builder<Person.PhoneNumber.Builder> alicePhones = alice.initPhones(1);
|
||||
|
@ -31,7 +33,7 @@ public class AddressbookMain {
|
|||
alicePhones.get(0).setType(Person.PhoneNumber.Type.MOBILE);
|
||||
alice.getEmployment().setSchool(new Text.Reader("MIT"));
|
||||
|
||||
Person.Builder bob = people.get(0);
|
||||
Person.Builder bob = people.get(1);
|
||||
bob.setId(456);
|
||||
bob.setName(new Text.Reader("Bob"));
|
||||
bob.setEmail(new Text.Reader("bob@example.com"));
|
||||
|
|
|
@ -82,7 +82,7 @@ final class WireHelpers {
|
|||
//# Initialize the pointer.
|
||||
ListPointer.set(segment.buffer, refOffset, FieldSize.BYTE, byteSize);
|
||||
|
||||
return new Text.Builder(segment.buffer, ptrOffset, size);
|
||||
return new Text.Builder(segment.buffer, ptrOffset * 8, size);
|
||||
}
|
||||
|
||||
public static Text.Builder setTextPointer(int refOffset,
|
||||
|
|
Loading…
Reference in a new issue