I wanted to have the Message class representing this composition:

OpenPGP Message :- Encrypted Message | Signed Message | Compressed Message | Literal Message.

From: http://tools.ietf.org/html/rfc4880#section-11.3

The idea is that the methods of the Message class "transforms" the message object into different representation:
- Message.decrypt tranforms Encrypted Message into e.g. Compressed Message, it returns a new message with a packlist containing the content of the packet_symmetrically_encrypted
- Message.unwrapCompressed returns a new Message with the content of the compressed packet,
this will be most of time be a packetlist that contains literal data packet
- Message.encrypt does: e.g. Literal Message -> Encrypted Message
And so on...

getText makes sense: if your Message does not have a literal data packet you just return null.

But what should setText do if your Message is e.g. a Compressed Message or a Encrypted Message?
Same for setBytes. That's why I think in these situations you would always create a new message with
fromText or fromBinary methods.

getBytes is also very generic. If you have a encrypted Encrypted Message what do you want to return?
getLiteralData is explicit: it either returns literal data or null if your message doesn't have it.