Java 类org.springframework.boot.loader.data.RandomAccessDataFile 实例源码
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFile.java
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarEntryFilter filter, JarFileType type)
throws IOException {
super(rootFile.getFile());
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;
CentralDirectoryParser parser = new CentralDirectoryParser();
this.entries = parser.addVisitor(new JarFileEntries(this, filter));
parser.addVisitor(centralDirectoryVisitor());
this.data = parser.parse(data, filter == null);
this.type = type;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFileTests.java
@Test
public void close() throws Exception {
RandomAccessDataFile randomAccessDataFile = spy(
new RandomAccessDataFile(this.rootJarFile, 1));
JarFile jarFile = new JarFile(randomAccessDataFile);
jarFile.close();
verify(randomAccessDataFile).close();
}
项目:spring-boot-concourse
文件:JarFile.java
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarEntryFilter filter, JarFileType type)
throws IOException {
super(rootFile.getFile());
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;
CentralDirectoryParser parser = new CentralDirectoryParser();
this.entries = parser.addVisitor(new JarFileEntries(this, filter));
parser.addVisitor(centralDirectoryVisitor());
this.data = parser.parse(data, filter == null);
this.type = type;
}
项目:spring-boot-concourse
文件:JarFileTests.java
@Test
public void close() throws Exception {
RandomAccessDataFile randomAccessDataFile = spy(
new RandomAccessDataFile(this.rootJarFile, 1));
JarFile jarFile = new JarFile(randomAccessDataFile);
jarFile.close();
verify(randomAccessDataFile).close();
}
项目:contestparser
文件:JarFile.java
/**
* Private constructor used to create a new {@link JarFile} either directly or from a
* nested entry.
* @param rootFile the root jar file
* @param pathFromRoot the name of this file
* @param data the underlying data
* @throws IOException if the file cannot be read
*/
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data) throws IOException {
super(rootFile.getFile());
CentralDirectoryEndRecord endRecord = new CentralDirectoryEndRecord(data);
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;
this.data = getArchiveData(endRecord, data);
this.entries = loadJarEntries(endRecord);
}
项目:contestparser
文件:JarFile.java
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, List<JarEntryData> entries, JarEntryFilter... filters)
throws IOException {
super(rootFile.getFile());
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;
this.data = data;
this.entries = filterEntries(entries, filters);
}
项目:contestparser
文件:JarFileTests.java
@Test
public void close() throws Exception {
RandomAccessDataFile randomAccessDataFile = spy(
new RandomAccessDataFile(this.rootJarFile, 1));
JarFile jarFile = new JarFile(randomAccessDataFile);
jarFile.close();
verify(randomAccessDataFile).close();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFile.java
protected final RandomAccessDataFile getRootJarFile() {
return this.rootFile;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:CentralDirectoryParserTests.java
@Before
public void setup() throws Exception {
this.jarFile = this.temporaryFolder.newFile();
TestJarCreator.createTestJar(this.jarFile);
this.jarData = new RandomAccessDataFile(this.jarFile);
}
项目:spring-boot-concourse
文件:JarFile.java
protected final RandomAccessDataFile getRootJarFile() {
return this.rootFile;
}
项目:spring-boot-concourse
文件:CentralDirectoryParserTests.java
@Before
public void setup() throws Exception {
this.jarFile = this.temporaryFolder.newFile();
TestJarCreator.createTestJar(this.jarFile);
this.jarData = new RandomAccessDataFile(this.jarFile);
}
项目:contestparser
文件:JarFile.java
protected final RandomAccessDataFile getRootJarFile() {
return this.rootFile;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
public JarFile(File file) throws IOException {
this(new RandomAccessDataFile(file));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
JarFile(RandomAccessDataFile file) throws IOException {
this(file, "", file, JarFileType.DIRECT);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:JarFile.java
/**
* Private constructor used to create a new {@link JarFile} either directly or from a
* nested entry.
* @param rootFile the root jar file
* @param pathFromRoot the name of this file
* @param data the underlying data
* @param type the type of the jar file
* @throws IOException if the file cannot be read
*/
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarFileType type) throws IOException {
this(rootFile, pathFromRoot, data, null, type);
}
项目:spring-boot-concourse
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
public JarFile(File file) throws IOException {
this(new RandomAccessDataFile(file));
}
项目:spring-boot-concourse
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
JarFile(RandomAccessDataFile file) throws IOException {
this(file, "", file, JarFileType.DIRECT);
}
项目:spring-boot-concourse
文件:JarFile.java
/**
* Private constructor used to create a new {@link JarFile} either directly or from a
* nested entry.
* @param rootFile the root jar file
* @param pathFromRoot the name of this file
* @param data the underlying data
* @param type the type of the jar file
* @throws IOException if the file cannot be read
*/
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarFileType type) throws IOException {
this(rootFile, pathFromRoot, data, null, type);
}
项目:contestparser
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
public JarFile(File file) throws IOException {
this(new RandomAccessDataFile(file));
}
项目:contestparser
文件:JarFile.java
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException if the file cannot be read
*/
JarFile(RandomAccessDataFile file) throws IOException {
this(file, "", file);
}