本文整理汇总了Java中org.springframework.boot.loader.data.RandomAccessDataFile类的典型用法代码示例。如果您正苦于以下问题:Java RandomAccessDataFile类的具体用法?Java RandomAccessDataFile怎么用?Java RandomAccessDataFile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RandomAccessDataFile类属于org.springframework.boot.loader.data包,在下文中一共展示了RandomAccessDataFile类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JarFile
import org.springframework.boot.loader.data.RandomAccessDataFile; //导入依赖的package包/类
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;
}
示例2: close
import org.springframework.boot.loader.data.RandomAccessDataFile; //导入依赖的package包/类
@Test
public void close() throws Exception {
RandomAccessDataFile randomAccessDataFile = spy(
new RandomAccessDataFile(this.rootJarFile, 1));
JarFile jarFile = new JarFile(randomAccessDataFile);
jarFile.close();
verify(randomAccessDataFile).close();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:JarFileTests.java
示例3: JarFile
import org.springframework.boot.loader.data.RandomAccessDataFile; //导入依赖的package包/类
/**
* 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);
}
示例4: getRootJarFile
import org.springframework.boot.loader.data.RandomAccessDataFile; //导入依赖的package包/类
protected final RandomAccessDataFile getRootJarFile() {
return this.rootFile;
}
示例5: setup
import org.springframework.boot.loader.data.RandomAccessDataFile; //导入依赖的package包/类
@Before
public void setup() throws Exception {
this.jarFile = this.temporaryFolder.newFile();
TestJarCreator.createTestJar(this.jarFile);
this.jarData = new RandomAccessDataFile(this.jarFile);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:CentralDirectoryParserTests.java