public Message getFile(int cache, int id) {
		if (cache == 255 && id == 255) {
			return crcPacket;
		}
		try {
			JagFS fs = cache == 255 ? jagCRC : jagFS[cache];
			MessageBuilder gen = new MessageBuilder();
			gen.writeByte((byte) cache).writeShort((short) id);
			byte[] file = null;
			file = fs.get(id);
			if (file == null)
				return null;
			int length = (((file[1] & 0xff) << 24) + ((file[2] & 0xff) << 16) + ((file[3] & 0xff) << 8) + (file[4] & 0xff)) + 9;
			if (file[0] == 0) {
				length -= 4;
			}
			int blockOffset = 3;
			for (int offset = 0; offset < length; offset++) {
				if (blockOffset == 512) {
					gen.writeByte((byte) 0xFF);
					blockOffset = 1;
				}
				gen.writeByte(file[offset]);
				blockOffset++;
			}
			return gen.toMessage();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}