class TypeDecoder {

    static Utf8String decodeUtf8String(String input, int offset) {
        DynamicBytes dynamicBytesResult = decodeDynamicBytes(input, offset);
        byte[] bytes = dynamicBytesResult.getValue();

        try {
            return new Utf8String(new String(bytes, "UTF-8"));
        } catch (UnsupportedEncodingException e) {
            return throwUnsupportedOperation(e, Utf8String.class);
        }
    }

}