@Override public void close() throws IOException { if (connHandler == null) { return; } super.close(); InputStream in = new FileInputStream(tmpFile); try { copyFileToRemote(fileName, in, this.tmpFile.length(), connHandler, fileManager); } finally { connHandler.releaseLock(); connHandler = null; in.close(); tmpFile.delete(); } }
private void releaseConnHandler(VsphereConnHandler connHandler) { if (connHandler != null) { connHandler.releaseLock(); } }