private boolean startsWithUtf8Marker(CmsResource res) {

        boolean result = false;
        try {
            if (res.isFile()) {
                CmsFile file = m_cms.readFile(res);
                if ((file.getContents().length >= 3)
                    && (file.getContents()[0] == CmsResourceWrapperUtils.UTF8_MARKER[0])
                    && (file.getContents()[1] == CmsResourceWrapperUtils.UTF8_MARKER[1])
                    && (file.getContents()[2] == CmsResourceWrapperUtils.UTF8_MARKER[2])) {
                    result = true;
                }
            }
        } catch (CmsException e) {
            LOG.debug(e);
        }
        return result;
    }
private boolean startsWithUtf8Marker ( CmsResource res ) { boolean result = false ; try { if ( res . isFile ( ) ) { CmsFile file = m_cms . readFile ( res ) ; if ( ( file . getContents ( ) . length >= 3 ) && ( file . getContents ( ) [ 0 ] == CmsResourceWrapperUtils . UTF8_MARKER [ 0 ] ) && ( file . getContents ( ) [ 1 ] == CmsResourceWrapperUtils . UTF8_MARKER [ 1 ] ) && ( file . getContents ( ) [ 2 ] == CmsResourceWrapperUtils . UTF8_MARKER [ 2 ] ) ) { result = true ; } } } catch ( CmsException e ) { LOG . debug ( e ) ; } return result ; }
Checks if the file content already contains the UTF8 marker.<p>

@param res the resource to check

@return <code>true</code> if the file content already contains the UTF8 marker