Code example for FileOutputStream

Methods: close

0
	 * @throws IOException 
	 *             if an I/O error occurs 
	 */ 
	private void copyFileToTemp(InputStream inputStream, long length) throws IOException {
		File tempFile = File.createTempFile("jar-", ".tmp");
		FileOutputStream fileOutputStream = new FileOutputStream(tempFile);
		FileUtil.copy(inputStream, fileOutputStream, length);
		fileOutputStream.close();
		tempFile.deleteOnExit();
		tempJarFile = new JarFile(tempFile);
	} 
 
	/** 
	 * {@inheritDoc} 
	 * <p> 
	 * This method searches the temporary copy of the jar file for an entry 
	 * that is specified by the given class name. 
	 *  
	 * @see java.lang.ClassLoader#findClass(java.lang.String) 
	 */ 
	@Override