| 1 21 package com.db4o.io; 22 23 import java.io.*; 24 25 28 public abstract class VanillaIoAdapter extends IoAdapter { 29 30 protected IoAdapter _delegate; 31 32 public VanillaIoAdapter(IoAdapter delegateAdapter){ 33 _delegate = delegateAdapter; 34 } 35 36 protected VanillaIoAdapter(IoAdapter delegateAdapter, String path, boolean lockFile, long initialLength) throws IOException { 37 _delegate = delegateAdapter.open(path, lockFile, initialLength); 38 } 39 40 public void close() throws IOException { 41 _delegate.close(); 42 } 43 44 public void delete(String path) { 45 _delegate.delete(path); 46 } 47 48 public boolean exists(String path) { 49 return _delegate.exists(path); 50 } 51 52 public long getLength() throws IOException { 53 return _delegate.getLength(); 54 } 55 56 public int read(byte[] bytes, int length) throws IOException { 57 return _delegate.read(bytes, length); 58 } 59 60 public void seek(long pos) throws IOException { 61 _delegate.seek(pos); 62 } 63 64 public void sync() throws IOException { 65 _delegate.sync(); 66 } 67 68 public void write(byte[] buffer, int length) throws IOException { 69 _delegate.write(buffer, length); 70 } 71 72 } 73 | Popular Tags |