@Override
	public int open(JoeTree tree, DocumentInfo docInfo, InputStream stream) {
		// Set the objects we are going to populate.
		this.docInfo = docInfo;
		this.tree = tree;
		
		// initialize result flags
		int success = FAILURE;
		errorOccurred = false;
		
		// try to read the file
		try {
			// we'll be grabbing chunks of data from the file
			// and storing them as arrays of raw bytes
			// so we send the readerWriter a stream of raw bytes
			BufferedInputStream bIStream = new BufferedInputStream(stream) ;
			DataInputStream byteStream = new DataInputStream(stream) ;

			// ask the reader-writer to try to read the file
			ourReaderWriter.read(byteStream);

			// as it reads the file, the reader-writer 
			// sends outline and node data 
			// back to methods in this class 
			// which actually build the outline
			
			// if there are problems, errorOccurred
			// gets set to true
			
			// if the reader-writer had a problem ...
			if (errorOccurred) {
				success = FAILURE;
			} else {
				success = SUCCESS;
			} // end else
		} // end try
		
//		// TBD deal with pdb exceptions
//		catch (PdbException e) {
//			success = FAILURE;
//			} // end catch
//		
		// deal with all other exceptions
		catch (Exception e) {
			
			success = FAILURE;
			
			String exceptionClass = new String(e.getClass().getName()) ;
			if (Outliner.DEBUG) {
				System.out.println("\tStan_Debug:\tPdbReaderWriter:read: just had a[n] " + exceptionClass + " exception");
			}
			
		} // end catch
		
		// if we get this far, we're okay
		return success;
	}