Java Code Examples for com.hippo.unifile.UniRandomAccessFile

The following examples show how to use com.hippo.unifile.UniRandomAccessFile. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: MHViewer   Source File: A7ZipArchive.java    License: Apache License 2.0 5 votes vote down vote up
static A7ZipArchive create(UniRandomAccessFile file) throws ArchiveException {
  InStream store = new UniRandomAccessFileInStream(file);
  InArchive archive = InArchive.open(store);
  if ((archive.getArchivePropertyType(PropID.ENCRYPTED) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.ENCRYPTED))
      || (archive.getArchivePropertyType(PropID.SOLID) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.SOLID))
      || (archive.getArchivePropertyType(PropID.IS_VOLUME) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.IS_VOLUME))) {
    throw new ArchiveException("Unsupported archive");
  }
  return new A7ZipArchive(archive);
}
 
Example 2
Source Project: EhViewer   Source File: A7ZipArchive.java    License: Apache License 2.0 5 votes vote down vote up
static A7ZipArchive create(UniRandomAccessFile file) throws ArchiveException {
  InStream store = new UniRandomAccessFileInStream(file);
  InArchive archive = InArchive.open(store);
  if ((archive.getArchivePropertyType(PropID.ENCRYPTED) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.ENCRYPTED))
      || (archive.getArchivePropertyType(PropID.SOLID) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.SOLID))
      || (archive.getArchivePropertyType(PropID.IS_VOLUME) == PropType.BOOL && archive.getArchiveBooleanProperty(PropID.IS_VOLUME))) {
    throw new ArchiveException("Unsupported archive");
  }
  return new A7ZipArchive(archive);
}
 
Example 3
Source Project: MHViewer   Source File: A7ZipArchive.java    License: Apache License 2.0 4 votes vote down vote up
public UniRandomAccessFileInStream(UniRandomAccessFile file) {
  this.file = file;
}
 
Example 4
Source Project: EhViewer   Source File: A7ZipArchive.java    License: Apache License 2.0 4 votes vote down vote up
public UniRandomAccessFileInStream(UniRandomAccessFile file) {
  this.file = file;
}