public String getSegmentDataAsString(final Charset encoding) {
        return new String(segmentData, encoding);
    }
Convert the bytes to a String

@param encoding segment encoding
@return the encoded bytes
src/main/java/org/apache/commons/imaging/formats/jpeg/segments/AbstractGenericSegment.java