public String readFragmentedUTF ( ) throws IOException { //String result = super.readUTF(); StringBuffer result = new StringBuffer ( super . readUTF ( ) ) ; boolean fragmentFlag = super . readBoolean ( ) ; while ( fragmentFlag != END_REACHED ) { //result = result.concat(super.readUTF()); result . append ( super . readUTF ( ) ) ; fragmentFlag = super . readBoolean ( ) ; } return result . toString ( ) ; }
Read a fragmented UTF - 8 String