Java Code Examples for java.io.RandomAccessFile#writeBoolean()
The following examples show how to use
java.io.RandomAccessFile#writeBoolean() .
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 File: RandomAccessFileTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * java.io.RandomAccessFile#readBoolean() */ public void test_readBoolean() throws IOException { // Test for method boolean java.io.RandomAccessFile.readBoolean() RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw"); raf.writeBoolean(true); raf.seek(0); assertTrue("Incorrect boolean read/written", raf.readBoolean()); raf.close(); }
Example 2
Source File: RandomAccessFileTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * java.io.RandomAccessFile#writeBoolean(boolean) */ public void test_writeBooleanZ() throws IOException { // Test for method void java.io.RandomAccessFile.writeBoolean(boolean) RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw"); raf.writeBoolean(true); raf.seek(0); assertTrue("Incorrect boolean read/written", raf.readBoolean()); raf.close(); }
Example 3
Source File: BinaryInteractionFile.java From systemsgenetics with GNU General Public License v3.0 | 5 votes |
private void open() throws FileNotFoundException, IOException { randomAccess = new RandomAccessFile(interactionFile, readOnly ? "r" : "rw"); if (!readOnly) { randomAccess.seek(POINTER_TO_CLOSED_BOOLEAN); randomAccess.writeBoolean(false); } channel = randomAccess.getChannel(); }
Example 4
Source File: BTree.java From btree4j with Apache License 2.0 | 4 votes |
@Override public synchronized void write(RandomAccessFile raf) throws IOException { super.write(raf); raf.writeBoolean(_duplicateAllowed); raf.writeLong(_rootPage); }
Example 5
Source File: BTreeIndex.java From btree4j with Apache License 2.0 | 4 votes |
@Override public void write(RandomAccessFile raf) throws IOException { super.write(raf); raf.writeBoolean(multiValue); freeList.write(raf); }