public DocumentReader(IDocument document){
  Assert.isNotNull(document);
  fDocument=document;
  fCharSequence=new DocumentCharSequence(fDocument);
  fDocument.addDocumentListener(fDocumentListener);
  fLength=fCharSequence.length();
}

public DocumentReader ( IDocument document ) { Assert . isNotNull ( document ) ; fDocument = document ; fCharSequence = new DocumentCharSequence ( fDocument ) ; fDocument . addDocumentListener ( fDocumentListener ) ; fLength = fCharSequence . length ( ) ; }
creates a new document input stream and initializes the stream to read from the given document .
