public void readWithKnownLength(DataInput in,int len) throws IOException {
  setCapacity(len,false);
  in.readFully(bytes,0,len);
  length=len;
}

public void readWithKnownLength ( DataInput in , int len ) throws IOException { setCapacity ( len , false ) ; in . readFully ( bytes , 0 , len ) ; length = len ; }
read a text object whose length is already known . this allows creating text from a stream which uses a different serialization format .
