private String getSchema ( ) { if ( Utils . isEmpty ( m_config . schema ) ) { m_config . schema = m_config . root + m_config . app + ".xml" ; } File schemaFile = new File ( m_config . schema ) ; if ( ! schemaFile . exists ( ) ) { logErrorThrow ( "Schema file not found: {}" , m_config . schema ) ; } StringBuilder schemaBuffer = new StringBuilder ( ) ; char [ ] charBuffer = new char [ 65536 ] ; try ( FileReader reader = new FileReader ( schemaFile ) ) { for ( int bytesRead = reader . read ( charBuffer ) ; bytesRead > 0 ; bytesRead = reader . read ( charBuffer ) ) { schemaBuffer . append ( charBuffer , 0 , bytesRead ) ; } } catch ( Exception e ) { logErrorThrow ( "Cannot read schema file '{}': {}" , m_config . schema , e ) ; } return schemaBuffer . toString ( ) ; }
Load schema contents from m_config . schema file .