question: public int read ( ) { if ( position >= document . getLength ( ) ) { return - 1 ; } try { document . getText ( ( int ) position , 1 , segment ) ; position ++ ; return segment . array [ segment . offset ] ; } catch ( BadLocationException ble ) { ble . printStackTrace ( ) ; return - 1 ; } }
target:  Reads the single character at the current position in the document.