rename some SerializePacked methods

This commit is contained in:
David Renshaw 2014-10-10 13:34:32 -04:00
parent 8cc1cfa60c
commit cc5ec73ef5
2 changed files with 7 additions and 7 deletions

View file

@ -57,14 +57,14 @@ public class AddressbookMain {
bobPhones.get(1).setType(Person.PhoneNumber.Type.WORK);
bob.getEmployment().setUnemployed(org.capnproto.Void.VOID);
org.capnproto.SerializePacked.writeUnbuffered(
org.capnproto.SerializePacked.writeToUnbuffered(
(new FileOutputStream(FileDescriptor.out)).getChannel(),
message);
}
public static void printAddressBook() throws java.io.IOException {
org.capnproto.MessageReader message =
org.capnproto.SerializePacked.readUnbuffered(
org.capnproto.SerializePacked.readFromUnbuffered(
(new FileInputStream(FileDescriptor.in)).getChannel());
AddressBook.Reader addressbook = message.getRoot(AddressBook.factory);
for(Person.Reader person : addressbook.getPeople()) {

View file

@ -32,12 +32,12 @@ public final class SerializePacked {
return Serialize.read(packedInput, options);
}
public static MessageReader readUnbuffered(java.nio.channels.ReadableByteChannel input) throws java.io.IOException {
return readUnbuffered(input, ReaderOptions.DEFAULT_READER_OPTIONS);
public static MessageReader readFromUnbuffered(java.nio.channels.ReadableByteChannel input) throws java.io.IOException {
return readFromUnbuffered(input, ReaderOptions.DEFAULT_READER_OPTIONS);
}
public static MessageReader readUnbuffered(java.nio.channels.ReadableByteChannel input,
ReaderOptions options) throws java.io.IOException {
public static MessageReader readFromUnbuffered(java.nio.channels.ReadableByteChannel input,
ReaderOptions options) throws java.io.IOException {
PackedInputStream packedInput = new PackedInputStream(new BufferedInputStreamWrapper(input));
return Serialize.read(packedInput, options);
}
@ -48,7 +48,7 @@ public final class SerializePacked {
Serialize.write(packedOutputStream, message);
}
public static void writeUnbuffered(java.nio.channels.WritableByteChannel output,
public static void writeToUnbuffered(java.nio.channels.WritableByteChannel output,
MessageBuilder message) throws java.io.IOException {
BufferedOutputStreamWrapper buffered = new BufferedOutputStreamWrapper(output);
write(buffered, message);