in commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java [1200:1226]
public InputStream getInputStream(final int bufferSize) throws FileSystemException {
// Get the raw input stream
try {
return doGetInputStream(bufferSize);
} catch (final org.apache.commons.vfs2.FileNotFoundException | FileNotFoundException exc) {
throw new org.apache.commons.vfs2.FileNotFoundException(fileName, exc);
} catch (final FileSystemException exc) {
throw exc;
} catch (final UnsupportedOperationException uoe) {
// TODO Remove for 3.0
// Backward compatibility for subclasses before 2.5.0
if (DO_GET_INPUT_STREAM_INT.equals(uoe.getMessage())) {
try {
// Invoke old API.
return doGetInputStream();
} catch (final Exception e) {
if (e instanceof FileSystemException) {
throw (FileSystemException) e;
}
throw new FileSystemException("vfs.provider/read.error", fileName, e);
}
}
throw uoe;
} catch (final Exception exc) {
throw new FileSystemException("vfs.provider/read.error", fileName, exc);
}
}