纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统

源代码在线查看: block.java

软件大小: 10941 K
上传用户: toctory
关键词: jnode java Java 操作系统
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*
				 * $Id: Block.java,v 1.4 2004/01/02 09:16:09 epr Exp $
				 */
				package org.jnode.fs.ext2.cache;
				
				import org.apache.log4j.Logger;
				
				/**
				 * @author Andras Nagy
				 */
				public class Block {
					byte[] data;
					boolean dirty = false;
					private static final Logger log = Logger.getLogger(Block.class);
				
					public Block(byte[] data) {
						this.data = data;
					}
					/**
					 * Returns the data.
					 * 
					 * @return byte[]
					 */
					public byte[] getData() {
						return data;
					}
				
					/**
					 * Sets the data.
					 * 
					 * @param data
					 *            The data to set
					 */
					public void setData(byte[] data) {
						this.data = data;
						dirty = true;
					}
				
					/**
					 * flush is called when the block is removed from the cache
					 */
					public void flush() {
						if (!dirty)
							return;
						//XXX...
						log.error("BLOCK FLUSHED FROM CACHE");
					}
				
				}
							

相关资源