protected static String readString(DataInput dis,int length) throws IOException, ArrayIndexOutOfBoundsException {
  String ret=null;
  char[] chars=new char[length];
  for (int i=0; i < length; i++) {
    chars[i]=dis.readChar();
  }
  ret=new String(chars);
  return ret;
}

protected static String readString ( DataInput dis , int length ) throws IOException , ArrayIndexOutOfBoundsException { String ret = null ; char [ ] chars = new char [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { chars [ i ] = dis . readChar ( ) ; } ret = new String ( chars ) ; return ret ; }
readstring reads an expected number of characters off a datainput and creates a string from it .
