public String receiveString ( ) throws IOException { int len = pgInput . scanCStringLength ( ) ; String res = encoding . decode ( pgInput . getBuffer ( ) , pgInput . getIndex ( ) , len - 1 ) ; pgInput . skip ( len ) ; return res ; }
Receives a null - terminated string from the backend . If we don t see a null then we assume something has gone wrong .