⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 storage.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Core License version 1 published by ozone-db.org.//// The original code and portions created by SMB are// Copyright (C) 1997-@year@, Leo Mekenkamp. All rights reserved.//// $Id: Storage.java,v 1.1 2004/01/02 09:24:38 leomekenkamp Exp $package org.ozoneDB.core.storage.gammaStore;import java.io.IOException;/** * <p>A meganism for storing and retrieving data to a permament back-end. * While implementing classes are typically backed by file-based structures, * this is in no way a _must_. Inheriting classes must must simply support * read/write actions from a 'random' location.</p> * <p>As the <code>IndexManager</code> also uses instances of this type to * write index nodes as a whole (no seek needed) there are also implementations * that not support seek functionality.</p> * * @author <a href="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a> */public interface Storage {        /**     * <p>Introduced because some implementing classes (based on <code>FileOutputStream</code>     * and <code>FileInputStream</code> for instance) might not support seek     * operations. They may throw an <code>UnsupportedOperationException</code>     * here, but still support writing and reading.</p>     * <p>Implementations of this interface are used in 2 different ways: the     * <code>IndexManager</code> does not perform any seek actions, and thus the     * storage implementation it uses can include stream based ones; the      * <code>ClusterManager</code> however does perform seek actions and thus     * cannot have a storage implementation with streams in it.</p>     *     * @throws UnsupportedOperationException     */    public void seek(long pos) throws IOException;        /**     * Write <code>lenght</code> bytes from <code>b</code>, starting at <code>     * offset</code>.     */    public void write(byte[] b, int offset, int length) throws IOException;    public void write(byte[] b) throws IOException;    public void writeLong(long value) throws IOException;        public void writeInt(int value) throws IOException;        /**     * Read <code>lenght</code> bytes from <code>b</code>, starting at <code>     * offset</code>.     */    public void readFully(byte[] b, int offset, int length) throws IOException;    public void readFully(byte[] b) throws IOException;        public long readLong() throws IOException;    public int readInt() throws IOException;    /**     * Sets the maximum length.     */    public void setLength(long length) throws IOException;        public void close() throws IOException;        public long length() throws IOException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -