private synchronized OutputStream current() throws IOException { if (current==null) try { current = new FileOutputStream(out,appendOnNextOpen); } catch (FileNotFoundException e) { throw new IOException2("Failed to open "+out,e); } return current; }
private synchronized OutputStream current() throws IOException { if (current==null) try { current = new FileOutputStream(out,appendOnNextOpen); } catch (FileNotFoundException e) { throw new IOException2("Failed to open "+out,e); } return current; }
private synchronized OutputStream current() throws IOException { if (current == null) { try { current = new FileOutputStream(out, appendOnNextOpen); } catch (FileNotFoundException e) { throw new IOException2("Failed to open " + out, e); } } return current; }
private synchronized OutputStream current() throws IOException { if (current==null) try { current = new FileOutputStream(out,appendOnNextOpen); } catch (FileNotFoundException e) { throw new IOException2("Failed to open "+out,e); } return current; }
/*package*/ static long parseTimestampFromBuildDir(File buildDir) throws IOException { try { return ID_FORMATTER.get().parse(buildDir.getName()).getTime(); } catch (ParseException e) { throw new IOException2("Invalid directory name "+buildDir,e); } catch (NumberFormatException e) { throw new IOException2("Invalid directory name "+buildDir,e); } }
/*package*/ static long parseTimestampFromBuildDir(File buildDir) throws IOException { try { return ID_FORMATTER.get().parse(buildDir.getName()).getTime(); } catch (ParseException e) { throw new IOException2("Invalid directory name "+buildDir,e); } catch (NumberFormatException e) { throw new IOException2("Invalid directory name "+buildDir,e); } }
/*package*/ static long parseTimestampFromBuildDir(File buildDir) throws IOException { try { return ID_FORMATTER.get().parse(buildDir.getName()).getTime(); } catch (ParseException e) { throw new IOException2("Invalid directory name "+buildDir,e); } catch (NumberFormatException e) { throw new IOException2("Invalid directory name "+buildDir,e); } }
/*package*/ static long parseTimestampFromBuildDir(File buildDir) throws IOException { try { return ID_FORMATTER.parse(buildDir.getName()).getTime(); } catch (ParseException e) { throw new IOException2("Invalid directory name " + buildDir, e); } catch (NumberFormatException e) { throw new IOException2("Invalid directory name " + buildDir, e); } }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { try { serveFile(req,rsp,base,icon,serveDirIndex); } catch (InterruptedException e) { throw new IOException2("interrupted",e); } }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { try { serveFile(req, rsp, base, icon, serveDirIndex); } catch (InterruptedException e) { throw new IOException2("interrupted", e); } }
private void join(Future<Void> task) throws InterruptedException, IOException { try { task.get(); } catch (ExecutionException e) { throw new IOException2(e); } }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { try { serveFile(req,rsp,base,icon,serveDirIndex); } catch (InterruptedException e) { throw new IOException2("interrupted",e); } }
public FilePath call() throws IOException { final File hprof = File.createTempFile("hudson-heapdump", "hprof"); hprof.delete(); try { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); server.invoke(new ObjectName("com.sun.management:type=HotSpotDiagnostic"), "dumpHeap", new Object[]{hprof.getAbsolutePath(), true}, new String[]{String.class.getName(), boolean.class.getName()}); return new FilePath(hprof); } catch (JMException e) { throw new IOException2(e); } }
private void join(Future<Void> task) throws InterruptedException, IOException { try { task.get(); } catch (ExecutionException e) { throw new IOException2(e); } }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { try { serveFile(req,rsp,base,icon,serveDirIndex); } catch (InterruptedException e) { throw new IOException2("interrupted",e); } }
public FilePath call() throws IOException { final File hprof = File.createTempFile("hudson-heapdump", "hprof"); hprof.delete(); try { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); server.invoke(new ObjectName("com.sun.management:type=HotSpotDiagnostic"), "dumpHeap", new Object[]{hprof.getAbsolutePath(), true}, new String[]{String.class.getName(), boolean.class.getName()}); return new FilePath(hprof); } catch (JMException e) { throw new IOException2(e); } }
public FilePath call() throws IOException { final File hprof = File.createTempFile("hudson-heapdump", "hprof"); hprof.delete(); try { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); server.invoke(new ObjectName("com.sun.management:type=HotSpotDiagnostic"), "dumpHeap", new Object[]{hprof.getAbsolutePath(), true}, new String[]{String.class.getName(), boolean.class.getName()}); return new FilePath(hprof); } catch (JMException e) { throw new IOException2(e); } } private static final long serialVersionUID = 1L;
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarEntry e = new TarEntry(relativePath, LF_SYMLINK); try { StringBuffer linkName = (StringBuffer) LINKNAME_FIELD.get(e); linkName.setLength(0); linkName.append(target); } catch (IllegalAccessException x) { throw new IOException2("Failed to set linkName", x); } tar.putNextEntry(e); entriesWritten++; }
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarEntry e = new TarEntry(relativePath, LF_SYMLINK); try { StringBuffer linkName = (StringBuffer) LINKNAME_FIELD.get(e); linkName.setLength(0); linkName.append(target); } catch (IllegalAccessException x) { throw new IOException2("Failed to set linkName", x); } tar.putNextEntry(e); entriesWritten++; }
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarEntry e = new TarEntry(relativePath, LF_SYMLINK); try { StringBuffer linkName = (StringBuffer) LINKNAME_FIELD.get(e); linkName.setLength(0); linkName.append(target); } catch (IllegalAccessException x) { throw new IOException2("Failed to set linkName", x); } tar.putNextEntry(e); entriesWritten++; }