Code example for RandomAccessFile

Methods: length, write

0
 
	@After 
	public void tearDown() throws Exception { 
		super.tearDown(); 
		 
		if (randomAccessFile != null) {
			randomAccessFile.close();
			theFile.delete();
		} 
	}; 
 
	/* (non-Javadoc) 
	 * @see org.eclipse.cdt.debug.edc.tests.BaseTestStreamBuffer#createBuffer(byte[], java.nio.ByteOrder) 
	 */ 
	@Override 
	protected IStreamBuffer createBuffer(byte[] content, ByteOrder order) throws Exception {
		theFile = File.createTempFile("FSB", "dat");
		randomAccessFile = new RandomAccessFile(theFile, "rw");
		randomAccessFile.write(content);
		return new FileStreamBuffer(randomAccessFile, order);
	} 
	 
	@Test 
	public void testDiskStreamLimits() throws Exception {