public byte[] getBinary(String attrName) {
        Object val = attributes.get(attrName);
        return toByteArray(val);
    }
Returns the value of the specified attribute in the current item as a
byte array; or null if the attribute either doesn't exist or the
attribute value is null.

@throws UnsupportedOperationException
            If the attribute value involves a byte buffer which is not
            backed by an accessible array

@throws IncompatibleTypeException
            if the attribute value cannot be converted into a byte array

@see #isNull(String) #isNull(String) to check if the attribute value is
     null.
@see #isPresent(String) #isPresent(String) to check if the attribute
     value is present.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java