private void writeAvatarImage(DeviceContact contact)// throws IOException { if (contact.getAvatar().HasValue) { //writeStream(contact.getAvatar().get().getInputStream()); } }
private void writeContactDetails(DeviceContact contact)// throws IOException { TextSecureProtos.ContactDetails.Builder contactDetails = TextSecureProtos.ContactDetails.CreateBuilder(); contactDetails.SetNumber(contact.getNumber()); /*if (contact.getName().HasValue) { contactDetails.SetName(contact.getName().ForceGetValue()); } if (contact.getAvatar().HasValue) { TextSecureProtos.ContactDetails.Avatar.Builder avatarBuilder = ContactDetails.Avatar.CreateBuilder(); avatarBuilder.setContentType(contact.getAvatar().ForceGetValue().getContentType()); avatarBuilder.setLength((int)contact.getAvatar().ForceGetValue().getLength()); contactDetails.SetAvatar(avatarBuilder); } byte[] serializedContactDetails = contactDetails.Build().ToByteArray(); writeVarint32(serializedContactDetails.Length); output.write(serializedContactDetails);*/ throw new NotImplementedException(); }
private void writeContactDetails(DeviceContact contact)// throws IOException { TextSecureProtos.ContactDetails.Builder contactDetails = TextSecureProtos.ContactDetails.CreateBuilder(); contactDetails.SetNumber(contact.getNumber()); /*if (contact.getName().HasValue) * { * contactDetails.SetName(contact.getName().ForceGetValue()); * } * * if (contact.getAvatar().HasValue) * { * TextSecureProtos.ContactDetails.Avatar.Builder avatarBuilder = ContactDetails.Avatar.CreateBuilder(); * avatarBuilder.setContentType(contact.getAvatar().ForceGetValue().getContentType()); * avatarBuilder.setLength((int)contact.getAvatar().ForceGetValue().getLength()); * contactDetails.SetAvatar(avatarBuilder); * } * * byte[] serializedContactDetails = contactDetails.Build().ToByteArray(); * * writeVarint32(serializedContactDetails.Length); * output.write(serializedContactDetails);*/ throw new NotImplementedException(); }
public void write(DeviceContact contact)// throws IOException { writeContactDetails(contact); writeAvatarImage(contact); }