Package java.io

Examples of java.io.RandomAccessFile.writeInt()


      queue.checkpoint(true);
      TimeUnit.SECONDS.sleep(3L);
      inflight = new RandomAccessFile(
              backingStoreSupplier.getInflightPuts(), "rw");
      inflight.seek(0);
      inflight.writeInt(new Random().nextInt());
      queue = new FlumeEventQueue(backingStore,
              backingStoreSupplier.getInflightTakes(),
              backingStoreSupplier.getInflightPuts(),
              backingStoreSupplier.getQueueSetDir());
      SetMultimap<Long, Long> deserializedMap = queue.deserializeInflightPuts();
View Full Code Here


      queue.checkpoint(true);
      TimeUnit.SECONDS.sleep(3L);
      inflight = new RandomAccessFile(
              backingStoreSupplier.getInflightTakes(), "rw");
      inflight.seek(0);
      inflight.writeInt(new Random().nextInt());
      queue = new FlumeEventQueue(backingStore,
              backingStoreSupplier.getInflightTakes(),
              backingStoreSupplier.getInflightPuts(),
              backingStoreSupplier.getQueueSetDir());
      SetMultimap<Long, Long> deserializedMap = queue.deserializeInflightTakes();
View Full Code Here

            //PrintWriter pw = new PrintWriter(fos);
            raf.writeChars(vectorsSeen + " " + vectorLength);
            break;
        case BINARY:
        case SPARSE_BINARY:
            raf.writeInt(vectorsSeen); // # of vectors
            raf.writeInt(vectorLength); // # of dimensions
            break;
        default:
            assert false : "unhandled s-space format";
        }
View Full Code Here

            raf.writeChars(vectorsSeen + " " + vectorLength);
            break;
        case BINARY:
        case SPARSE_BINARY:
            raf.writeInt(vectorsSeen); // # of vectors
            raf.writeInt(vectorLength); // # of dimensions
            break;
        default:
            assert false : "unhandled s-space format";
        }
        raf.close();
View Full Code Here

        long usableSpaceRefreshInterval)
        throws IOException {
      super(file, logFileID, maxFileSize, null, usableSpaceRefreshInterval,
        true, 0);
      RandomAccessFile writeFileHandle = getFileHandle();
      writeFileHandle.writeInt(getVersion());
      writeFileHandle.writeInt(logFileID);
      // checkpoint marker
      writeFileHandle.writeLong(0L);
      // timestamp placeholder
      writeFileHandle.writeLong(0L);
View Full Code Here

        throws IOException {
      super(file, logFileID, maxFileSize, null, usableSpaceRefreshInterval,
        true, 0);
      RandomAccessFile writeFileHandle = getFileHandle();
      writeFileHandle.writeInt(getVersion());
      writeFileHandle.writeInt(logFileID);
      // checkpoint marker
      writeFileHandle.writeLong(0L);
      // timestamp placeholder
      writeFileHandle.writeLong(0L);
      getFileChannel().force(true);
View Full Code Here

                RandomAccessFile matrixRaf =
                    new RandomAccessFile(dataFile, "rw");

                // Back fill the dimensions of the matrix and the number of
                // non-zero values as the 3 int header in the file
                matrixRaf.writeInt(numRows);
                matrixRaf.writeInt(curCol);
                matrixRaf.writeInt(nonZeroValues);
                matrixRaf.close();
            } catch (IOException ioe) {
                throw new IOError(ioe);
View Full Code Here

                    new RandomAccessFile(dataFile, "rw");

                // Back fill the dimensions of the matrix and the number of
                // non-zero values as the 3 int header in the file
                matrixRaf.writeInt(numRows);
                matrixRaf.writeInt(curCol);
                matrixRaf.writeInt(nonZeroValues);
                matrixRaf.close();
            } catch (IOException ioe) {
                throw new IOError(ioe);
            }
View Full Code Here

                // Back fill the dimensions of the matrix and the number of
                // non-zero values as the 3 int header in the file
                matrixRaf.writeInt(numRows);
                matrixRaf.writeInt(curCol);
                matrixRaf.writeInt(nonZeroValues);
                matrixRaf.close();
            } catch (IOException ioe) {
                throw new IOError(ioe);
            }
View Full Code Here

      raf.write(cipherManager.getDiskSalt());

      raf.writeLong(storeSize);
      raf.writeLong(prevStoreSize);
      raf.writeLong(keyCount.get());
      raf.writeInt(generation);
      raf.writeInt(flags);
      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.