public void write(byte[] data, long offset, VDK1FilePattern pattern) {
	
		byte[] resultBuffer = new byte[pattern.getLength()];
		
		try {
			
			seek(offset + pattern.getOffset());
			
			if(pattern.isLittleEndian()) {
				for(int i = 0; i < data.length; i++)
					resultBuffer[(data.length - 1) - i] = data[i];
			}			
			// Data are naturally red as big endian bit sequence.
			else {										
				for(int i = 0; i < data.length; i++)
					resultBuffer[i] = data[i];
			}
			
			write(resultBuffer);
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}