/** * Set this entry's group id. * * @param groupId This entry's new group id. */ public void setGroupId(int groupId) { setGroupId((long) groupId); }
/** * Convenience method to set this entry's group and user ids. * * @param userId This entry's new user id. * @param groupId This entry's new group id. */ public void setIds(int userId, int groupId) { setUserId(userId); setGroupId(groupId); }
break; case "gid": currEntry.setGroupId(Long.parseLong(val)); break; case "gname":
te.setUserId(tr.getLongUid()); te.setGroupName(tr.getGroup()); te.setGroupId(tr.getLongGid()); te.setGroupId(tarFileSet.getGid());
protected int putFileContent(Launcher launcher, String containerId, String path, String filename, byte[] content, Integer mode) throws IOException, InterruptedException { TarEntry entry = new TarEntry(filename); entry.setUserId(0); entry.setGroupId(0); entry.setSize(content.length); if (mode != null) { entry.setMode(mode); } ByteArrayOutputStream out = new ByteArrayOutputStream(); TarOutputStream tar = new TarOutputStream(out); tar.putNextEntry(entry); tar.write(content); tar.closeEntry(); tar.close(); ArgumentListBuilder args = new ArgumentListBuilder() .add("cp", "-", containerId + ":" + path); return launchDockerCLI(launcher, args) .stdin(new ByteArrayInputStream(out.toByteArray())) .stderr(launcher.getListener().getLogger()).join(); }
protected int putFileContent(Launcher launcher, String containerId, String path, String filename, byte[] content, Integer mode) throws IOException, InterruptedException { TarEntry entry = new TarEntry(filename); entry.setUserId(0); entry.setGroupId(0); entry.setSize(content.length); if (mode != null) { entry.setMode(mode); } ByteArrayOutputStream out = new ByteArrayOutputStream(); TarOutputStream tar = new TarOutputStream(out); tar.putNextEntry(entry); tar.write(content); tar.closeEntry(); tar.close(); ArgumentListBuilder args = new ArgumentListBuilder() .add("cp", "-", containerId + ":" + path); return launchDockerCLI(launcher, args) .stdin(new ByteArrayInputStream(out.toByteArray())) .stderr(launcher.getListener().getLogger()).join(); }