@ Override public char readChar ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readChar" ) ; try { // Check that we are in read mode checkBodyReadable ( "readChar" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Mark the current position, so we can return to it if there's an error readStream . mark ( 2 ) ; char result = readStream . readChar ( ) ; // Byte swap the character if required if ( integerEncoding == ApiJmsConstants . ENC_INTEGER_REVERSED ) { result = Character . reverseBytes ( result ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "readChar" , result ) ; return result ; } catch ( IOException e ) { try { readStream . reset ( ) ; // return to the marked position } catch ( IOException e2 ) { } JMSException jmse = ( JMSException ) JmsErrorUtils . newThrowable ( MessageEOFException . class , "END_BYTESMESSAGE_CWSIA0183" , null , tc ) ; jmse . initCause ( e ) ; throw jmse ; } }
Read a Unicode character value from the stream message .