예제 #1
0
 @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();
   }
 }
예제 #2
0
 private void releaseConnHandler(VsphereConnHandler connHandler) {
   if (connHandler != null) {
     connHandler.releaseLock();
   }
 }