This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient / OracleBFile.cs
1 //
2 // OracleBFile.cs 
3 //
4 // Part of the Mono class libraries at
5 // mcs/class/System.Data.OracleClient/System.Data.OracleClient
6 //
7 // Assembly: System.Data.OracleClient.dll
8 // Namespace: System.Data.OracleClient
9 //
10 // Author: Tim Coleman <tim@timcoleman.com>
11 //
12 // Copyright (C) Tim Coleman, 2003
13 //
14 // Licensed under the MIT/X11 License.
15 //
16
17 using System;
18 using System.IO;
19 using System.Data.SqlTypes;
20
21 namespace System.Data.OracleClient {
22         public sealed class OracleBFile : Stream, ICloneable, INullable
23         {
24                 #region Fields
25
26                 public static readonly new OracleBFile Null = new OracleBFile ();
27
28                 OracleConnection connection;
29                 bool isOpen = true;
30                 bool notNull = false;
31
32                 #endregion // Fields
33
34                 #region Constructors
35
36                 internal OracleBFile ()
37                 {
38                 }
39
40                 #endregion // Constructors
41
42                 #region Properties
43
44                 public override bool CanRead {
45                         get { return (IsNull || isOpen); }
46                 }
47
48                 public override bool CanSeek {
49                         get { return (IsNull || isOpen); }
50                 }
51
52                 public override bool CanWrite {
53                         get { return false; }
54                 }
55
56                 public OracleConnection Connection {
57                         get { return connection; }
58                 }
59
60                 public string DirectoryName {
61                         [MonoTODO]
62                         get { 
63                                 if (!isOpen)
64                                         throw new ObjectDisposedException ("OracleBFile");
65                                 throw new NotImplementedException ();
66                         }
67                 }
68
69                 public bool FileExists {
70                         [MonoTODO]
71                         get { 
72                                 if (!isOpen)
73                                         throw new ObjectDisposedException ("OracleBFile");
74                                 if (Connection.State == ConnectionState.Closed)
75                                         throw new InvalidOperationException ();
76                                 throw new NotImplementedException ();
77                         }
78                 }
79
80                 public string FileName {
81                         [MonoTODO]
82                         get {
83                                 if (!isOpen)
84                                         throw new ObjectDisposedException ("OracleBFile");
85                                 if (IsNull)
86                                         return String.Empty;
87                                 throw new NotImplementedException ();
88                         }
89                 }
90
91                 public bool IsNull {
92                         get { return !notNull; }
93                 }
94
95                 public override long Length {
96                         [MonoTODO]
97                         get { 
98                                 if (!isOpen)
99                                         throw new ObjectDisposedException ("OracleBFile");
100                                 throw new NotImplementedException ();
101                         }
102                 }
103
104                 public override long Position {
105                         [MonoTODO]
106                         get { 
107                                 if (!isOpen)
108                                         throw new ObjectDisposedException ("OracleBFile");
109                                 throw new NotImplementedException ();
110                         }
111                         [MonoTODO]
112                         set {
113                                 if (!isOpen)
114                                         throw new ObjectDisposedException ("OracleBFile");
115                                 if (value > Length) 
116                                         throw new ArgumentOutOfRangeException ();
117                                 throw new NotImplementedException ();
118                         }
119                 }
120
121                 public object Value {
122                         [MonoTODO]
123                         get { 
124                                 throw new NotImplementedException ();
125                         }
126                 }
127
128                 #endregion // Properties
129
130                 #region Methods
131
132                 [MonoTODO]
133                 public object Clone ()
134                 {
135                         throw new NotImplementedException ();
136                 }
137
138                 [MonoTODO]
139                 public long CopyTo (OracleLob destination)
140                 {
141                         throw new NotImplementedException ();
142                 }
143
144                 [MonoTODO]
145                 public long CopyTo (OracleLob destination, long destinationOffset)
146                 {
147                         throw new NotImplementedException ();
148                 }
149
150                 [MonoTODO]
151                 public long CopyTo (long sourceOffset, OracleLob destination, long destinationOffset, long amount)
152                 {
153                         throw new NotImplementedException ();
154                 }
155
156                 [MonoTODO]
157                 public void Dispose ()
158                 {
159                         throw new NotImplementedException ();
160                 }
161
162                 [MonoTODO]
163                 public override void Flush ()
164                 {
165                         throw new NotImplementedException ();
166                 }
167
168                 [MonoTODO]
169                 public override int Read (byte[] buffer, int offset, int count)
170                 {
171                         throw new NotImplementedException ();
172                 }
173
174                 [MonoTODO]
175                 public override long Seek (long offset, SeekOrigin origin)
176                 {
177                         throw new NotImplementedException ();
178                 }
179
180                 [MonoTODO]
181                 public void SetFileName (string directory, string file)
182                 {
183                         throw new NotImplementedException ();
184                 }
185
186                 [MonoTODO]
187                 public override void SetLength (long value)
188                 {
189                         throw new InvalidOperationException ();
190                 }
191
192                 [MonoTODO]
193                 public override void Write (byte[] buffer, int offset, int count)
194                 {
195                         throw new NotSupportedException ();
196                 }
197
198                 #endregion // Methods
199         }
200 }