class OpenLRBinaryDecoder implements PhysicalDecoder {

    @Override
    public RawLocationReference decodeData(final LocationReference lr)
            throws PhysicalFormatException {
        Object data = lr.getLocationReferenceData();
        if (data == null || !(data instanceof ByteArray)) {
            throw new OpenLRBinaryException(
                    PhysicalFormatError.INVALID_BINARY_DATA);
        }
        ByteArray dataList = (ByteArray) data;
        return parseBinaryData(lr.getID(), dataList.getData(), null);
    }

}