Package net.sf.joafip.file.service

Examples of net.sf.joafip.file.service.RandomAccessFileDirectNio


        randomAccessFile = new RandomAccessFileDirect(file,
            fileAccessParameter.getMaxRetry(),
            fileAccessParameter.getRetryMsDelay());
        break;
      case NIO_RANDOM_FILE_ACCESS:
        randomAccessFile = new RandomAccessFileDirectNio(file,
            fileAccessParameter.getMaxRetry(),
            fileAccessParameter.getRetryMsDelay());
        break;
      case MAPPED_RANDOM_FILE_ACCESS:
        randomAccessFile = new RandomAccessFileDirectMapped(file,
View Full Code Here


*/
@NotStorableClass
public class FileInputStreamNIO extends AbstractFileInputStreamOnRandomFile {

  public FileInputStreamNIO(final File file) throws IOException {
    super(new RandomAccessFileDirectNio(file, 1, 0));
  }
View Full Code Here

@NotStorableClass
public class FileOutputStreamNIO extends AbstractFileOutputStreamOnRandomFile {

  public FileOutputStreamNIO(final File file, final boolean append)
      throws FileNotFoundException {
    super(new RandomAccessFileDirectNio(file, 1, 0), append);
  }
View Full Code Here

    super();
    if (blockLength >= 0xffff) {
      throw new HeapException("too big block length");
    }
    final File file = new File(filePath);
    randomAccessFile = new RandomAccessFileDirectNio(file, 0, 0);
    // randomAccessFile = new RandomAccessFileDirect(file, 0, 0);
    header.setBlockLength(blockLength);
  }
View Full Code Here

  public BlockDataManager(final int pageSize, final int maxPage,
      final int blockLength) throws HeapException {
    super();
    final File file = new File("runtime/data");
    final IRandomAccessFile drandomAccessFile = new RandomAccessFileDirectNio(
        file, 0, 0);
    try {
      randomAccessFile = new RandomAccessFileReadWriteCache(
          drandomAccessFile, pageSize, maxPage, true);
    } catch (FileIOException exception) {
View Full Code Here

    dataAccessSession.close(EnumFilePersistenceCloseAction.SAVE);
    filePersistence.close();
  }

  private void assertDataAndBackupAreSame() throws FileIOException {
    final IRandomAccessFile randomAccessFile = new RandomAccessFileDirectNio(
        new File(dataFile), 1, 0);
    final SortedMap<Integer, Integer> diffMap = new TreeMap<Integer, Integer>();
    final boolean differs = randomAccessFile.differs(backupFile, diffMap);
    if (differs) {
      LOGGER.error("differs\n" + diffMap.toString());
    }
    assertFalse("file content must be same", differs);
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.file.service.RandomAccessFileDirectNio

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.