code: private String getStringValue(CmsObject cms, CmsResource resource, byte[] content) throws CmsException {
  
          // get the encoding for the resource
          CmsProperty prop = cms.readPropertyObject(resource, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true);
          String enc = prop.getValue();
          if (enc == null) {
              enc = OpenCms.getSystemInfo().getDefaultEncoding();
          }
  
          // create a String with the right encoding
          return CmsEncoder.createString(content, enc);
      }
docs: Returns the content as a string while using the correct encoding.<p>
  
  @param cms the initialized CmsObject
  @param resource the resource where the content belongs to
  @param content the byte array which should be converted into a string
  
  @return the content as a string
  
  @throws CmsException if something goes wrong