public Message readSTUNMessage(final InputStream in) throws IOException {
final DataInputStream dis = new DataInputStream(in);
// read 20 bytes for message header
final byte[] headerBytes = new byte[20];
dis.readFully(headerBytes);
final MessageHeader header = this.headerDecoder.decodeSTUNMessageHeader(headerBytes);
// read rest of message
final byte[] attributeBytes = new byte[header.getLength()];
dis.readFully(attributeBytes);
final List<Attribute> attributes = this.attributeDecoder.decodeSTUNAttributes(attributeBytes, header);
final Message message = new MessageImpl(header);
for (final Attribute a : attributes) {
message.addAttribute(a);