/** * Creates a new instance from a stream. * * @param fsResource the file system resource * @throws IOException */ private BLOBInResource(FileSystemResource fsResource) throws IOException { try { if (!fsResource.exists()) { throw new IOException(fsResource.getPath() + ": the specified resource does not exist"); } length = fsResource.length(); } catch (FileSystemException fse) { IOException e2 = new IOException(fsResource.getPath() + ": Error while creating value: " + fse.toString()); e2.initCause(fse); throw e2; } this.fsResource = fsResource; }
/** * Creates a new instance from a stream. * * @param fsResource the file system resource * @throws IOException */ private BLOBInResource(FileSystemResource fsResource) throws IOException { try { if (!fsResource.exists()) { throw new IOException(fsResource.getPath() + ": the specified resource does not exist"); } length = fsResource.length(); } catch (FileSystemException fse) { IOException e2 = new IOException(fsResource.getPath() + ": Error while creating value: " + fse.toString()); e2.initCause(fse); throw e2; } this.fsResource = fsResource; }