001: /*
002: * CABAReT solutions
003: * all rights reserved
004: *
005: */
006: package de.intarsys.tools.locator;
007:
008: import java.io.IOException;
009: import java.io.InputStream;
010: import java.io.OutputStream;
011: import java.io.Reader;
012: import java.io.Writer;
013: import java.net.URL;
014:
015: import de.intarsys.tools.randomaccess.IRandomAccess;
016:
017: /*
018: * DOCME
019: */
020: public class ReadOnlyLocator implements ILocator {
021:
022: private ILocator delegate;
023:
024: public ReadOnlyLocator(ILocator delegate) {
025: super ();
026: this .delegate = delegate;
027: }
028:
029: public String getLocalName() {
030: return getDelegate().getLocalName();
031: }
032:
033: public ILocator getDelegate() {
034: return delegate;
035: }
036:
037: public boolean exists() {
038: return getDelegate().exists();
039: }
040:
041: public ILocator getChild(String name) {
042: return getDelegate().getChild(name);
043: }
044:
045: public String getFullName() {
046: return getDelegate().getFullName();
047: }
048:
049: public InputStream getInputStream() throws IOException {
050: return getDelegate().getInputStream();
051: }
052:
053: public OutputStream getOutputStream() throws IOException {
054: return getDelegate().getOutputStream();
055: }
056:
057: public ILocator getParent() {
058: return getDelegate().getParent();
059: }
060:
061: public IRandomAccess getRandomAccess() throws IOException {
062: return getDelegate().getRandomAccess();
063: }
064:
065: public Reader getReader() throws IOException {
066: return getDelegate().getReader();
067: }
068:
069: public Reader getReader(String encoding) throws IOException {
070: return getDelegate().getReader(encoding);
071: }
072:
073: public String getType() {
074: return getDelegate().getType();
075: }
076:
077: public String getTypedName() {
078: return getDelegate().getTypedName();
079: }
080:
081: public Writer getWriter() throws IOException {
082: return getDelegate().getWriter();
083: }
084:
085: public Writer getWriter(String encoding) throws IOException {
086: return getDelegate().getWriter(encoding);
087: }
088:
089: public boolean isDirectory() {
090: return getDelegate().isDirectory();
091: }
092:
093: public boolean isOutOfSynch() {
094: return getDelegate().isOutOfSynch();
095: }
096:
097: public boolean isSynchSynchronous() {
098: return getDelegate().isSynchSynchronous();
099: }
100:
101: public ILocator[] listLocators(ILocatorNameFilter filter)
102: throws IOException {
103: return getDelegate().listLocators(filter);
104: }
105:
106: public void synch() {
107: getDelegate().synch();
108: }
109:
110: public URL toURL() {
111: return getDelegate().toURL();
112: }
113:
114: public void delete() throws IOException {
115: getDelegate().delete();
116: }
117:
118: public boolean isReadOnly() {
119: return true;
120: }
121:
122: public void rename(String newName) throws IOException {
123: getDelegate().rename(newName);
124: }
125:
126: public void setReadOnly() {
127: getDelegate().setReadOnly();
128: }
129:
130: }
|