Java Code Examples for com.google.protobuf.nano.MessageNano#toByteArray()

The following examples show how to use com.google.protobuf.nano.MessageNano#toByteArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LauncherBackupHelper.java    From TurboLauncher with Apache License 2.0 5 votes vote down vote up
/** Wrap a proto in a CheckedMessage and compute the checksum. */
private byte[] writeCheckedBytes(MessageNano proto) {
    CheckedMessage wrapper = new CheckedMessage();
    wrapper.payload = MessageNano.toByteArray(proto);
    CRC32 checksum = new CRC32();
    checksum.update(wrapper.payload);
    wrapper.checksum = checksum.getValue();
    return MessageNano.toByteArray(wrapper);
}
 
Example 2
Source File: LauncherBackupHelper.java    From LB-Launcher with Apache License 2.0 5 votes vote down vote up
/** Wrap a proto in a CheckedMessage and compute the checksum. */
private byte[] writeCheckedBytes(MessageNano proto) {
    CheckedMessage wrapper = new CheckedMessage();
    wrapper.payload = MessageNano.toByteArray(proto);
    CRC32 checksum = new CRC32();
    checksum.update(wrapper.payload);
    wrapper.checksum = checksum.getValue();
    return MessageNano.toByteArray(wrapper);
}
 
Example 3
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 4
Source File: ChannelCommon.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 5
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 6
Source File: Client.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 7
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 8
Source File: JavaClient.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 9
Source File: AndroidService.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 10
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 11
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 12
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 13
Source File: AndroidService.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 14
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 15
Source File: AndroidService.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 16
Source File: AndroidService.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 17
Source File: Client.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 18
Source File: ClientProtocol.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 19
Source File: AndroidService.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public byte[] toByteArray() {
  return MessageNano.toByteArray(toMessageNano());
}
 
Example 20
Source File: CatalogItemStore.java    From android-migrate-to-jobs with Apache License 2.0 4 votes vote down vote up
public byte[] toProtoBytes() {
    return MessageNano.toByteArray(mProto);
}