public static DocViewerComponent open(InputStream input,final String name,final String format){
  DocViewerComponent comp=new DocViewerComponent(name);
  BufferedReader br;
  br=new BufferedReader(new InputStreamReader(input,Charset.forName("UTF-8")));
  String line;
  String text=new String();
  try {
    while ((line=br.readLine()) != null) {
      text=text.concat(line + "\n");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  comp.setText(text);
  return comp;
}

public static DocViewerComponent open ( InputStream input , final String name , final String format ) { DocViewerComponent comp = new DocViewerComponent ( name ) ; BufferedReader br ; br = new BufferedReader ( new InputStreamReader ( input , Charset . forName ( "UTF-8" ) ) ) ; String line ; String text = new String ( ) ; try { while ( ( line = br . readLine ( ) ) != null ) { text = text . concat ( line + "\n" ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } comp . setText ( text ) ; return comp ; }
opens a saved component . there isn ' t much to do here since currently there is nothing to persist with a console . this just ensures that a component is created and ( in the gui ) presented .
