Code example for URI

Methods: getPath

0
 
    private BufferedReader openRegularFile(URI filename)
            throws DataSourceException { 
        FileInputStream stream;
        try { 
            stream = new FileInputStream(filename.getPath());
        } catch(FileNotFoundException e) {
            throw new DataSourceException( 
                "Couldn't open the trace file " + filename, e);
        } 
 
        return readerForStream(stream);
    } 
 
    private BufferedReader readerForStream(InputStream stream) {
        DataInputStream dataStream = new DataInputStream(stream);
        return new BufferedReader(new InputStreamReader(dataStream));
    } 
 
    private BufferedReader openFile(URI filename)
            throws DataSourceException {