KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > vfs > provider > AbstractRandomAccessContent


1 /*
2  * Copyright 2002-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.vfs.provider;
17
18 import org.apache.commons.vfs.RandomAccessContent;
19 import org.apache.commons.vfs.util.RandomAccessMode;
20
21 import java.io.IOException JavaDoc;
22
23 /**
24  * Implements the DataOutput part of the RandomAccessContent interface and throws
25  * UnsupportedOperationException if one of those methods are called.
26  * (for read-only random access implementations)
27  *
28  * @author <a HREF="mailto:imario@apache.org">Mario Ivankovits</a>
29  */

30 public abstract class AbstractRandomAccessContent implements RandomAccessContent
31 {
32     private final RandomAccessMode mode;
33
34     protected AbstractRandomAccessContent(final RandomAccessMode mode)
35     {
36         this.mode = mode;
37     }
38
39     public void writeDouble(double v) throws IOException JavaDoc
40     {
41         throw new UnsupportedOperationException JavaDoc();
42     }
43
44     public void writeFloat(float v) throws IOException JavaDoc
45     {
46         throw new UnsupportedOperationException JavaDoc();
47     }
48
49     public void write(int b) throws IOException JavaDoc
50     {
51         throw new UnsupportedOperationException JavaDoc();
52     }
53
54     public void writeByte(int v) throws IOException JavaDoc
55     {
56         throw new UnsupportedOperationException JavaDoc();
57     }
58
59     public void writeChar(int v) throws IOException JavaDoc
60     {
61         throw new UnsupportedOperationException JavaDoc();
62     }
63
64     public void writeInt(int v) throws IOException JavaDoc
65     {
66         throw new UnsupportedOperationException JavaDoc();
67     }
68
69     public void writeShort(int v) throws IOException JavaDoc
70     {
71         throw new UnsupportedOperationException JavaDoc();
72     }
73
74     public void writeLong(long v) throws IOException JavaDoc
75     {
76         throw new UnsupportedOperationException JavaDoc();
77     }
78
79     public void writeBoolean(boolean v) throws IOException JavaDoc
80     {
81         throw new UnsupportedOperationException JavaDoc();
82     }
83
84     public void write(byte b[]) throws IOException JavaDoc
85     {
86         throw new UnsupportedOperationException JavaDoc();
87     }
88
89     public void write(byte b[], int off, int len) throws IOException JavaDoc
90     {
91         throw new UnsupportedOperationException JavaDoc();
92     }
93
94     public void writeBytes(String JavaDoc s) throws IOException JavaDoc
95     {
96         throw new UnsupportedOperationException JavaDoc();
97     }
98
99     public void writeChars(String JavaDoc s) throws IOException JavaDoc
100     {
101         throw new UnsupportedOperationException JavaDoc();
102     }
103
104     public void writeUTF(String JavaDoc str) throws IOException JavaDoc
105     {
106         throw new UnsupportedOperationException JavaDoc();
107     }
108
109     /**
110      * @deprecated see {@link java.io.DataInputStream#readLine()}
111      */

112     public String JavaDoc readLine() throws IOException JavaDoc
113     {
114         throw new UnsupportedOperationException JavaDoc("deprecated");
115     }
116 }
117
Popular Tags