public String getSubString ( long pos , int length ) throws SQLException { if ( pos < 1 ) { throw ExceptionMapper . getSqlException ( "position must be >= 1" ) ; } if ( length < 0 ) { throw ExceptionMapper . getSqlException ( "length must be > 0" ) ; } try { String val = toString ( ) ; return val . substring ( ( int ) pos - 1 , Math . min ( ( int ) pos - 1 + length , val . length ( ) ) ) ; } catch ( Exception e ) { throw new SQLException ( e ) ; } }
Get sub string .