New test.
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient.jvm / 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                 #region Fields
24
25                 public static readonly new OracleBFile Null = new OracleBFile ();
26
27                 OracleConnection connection;
28                 bool isOpen = true;
29                 bool notNull = false;
30
31                 #endregion // Fields
32
33                 #region Constructors
34
35                 internal OracleBFile () {
36                 }
37
38                 #endregion // Constructors
39
40                 #region Properties
41
42                 public override bool CanRead {
43                         get { return (IsNull || isOpen); }
44                 }
45
46                 public override bool CanSeek {
47                         get { return (IsNull || isOpen); }
48                 }
49
50                 public override bool CanWrite {
51                         get { return false; }
52                 }
53
54                 public OracleConnection Connection {
55                         get { return connection; }
56                 }
57
58                 public string DirectoryName {
59                         [MonoTODO]
60                         get { 
61                                 if (!isOpen)
62                                         throw new ObjectDisposedException ("OracleBFile");
63                                 throw new NotImplementedException ();
64                         }
65                 }
66
67                 public bool FileExists {
68                         [MonoTODO]
69                         get { 
70                                 if (!isOpen)
71                                         throw new ObjectDisposedException ("OracleBFile");
72                                 if (Connection.State == ConnectionState.Closed)
73                                         throw new InvalidOperationException ();
74                                 throw new NotImplementedException ();
75                         }
76                 }
77
78                 public string FileName {
79                         [MonoTODO]
80                         get {
81                                 if (!isOpen)
82                                         throw new ObjectDisposedException ("OracleBFile");
83                                 if (IsNull)
84                                         return String.Empty;
85                                 throw new NotImplementedException ();
86                         }
87                 }
88
89                 public bool IsNull {
90                         get { return !notNull; }
91                 }
92
93                 public override long Length {
94                         [MonoTODO]
95                         get { 
96                                 if (!isOpen)
97                                         throw new ObjectDisposedException ("OracleBFile");
98                                 throw new NotImplementedException ();
99                         }
100                 }
101
102                 public override long Position {
103                         [MonoTODO]
104                         get { 
105                                 if (!isOpen)
106                                         throw new ObjectDisposedException ("OracleBFile");
107                                 throw new NotImplementedException ();
108                         }
109                         [MonoTODO]
110                         set {
111                                 if (!isOpen)
112                                         throw new ObjectDisposedException ("OracleBFile");
113                                 if (value > Length) 
114                                         throw new ArgumentOutOfRangeException ();
115                                 throw new NotImplementedException ();
116                         }
117                 }
118
119                 public object Value {
120                         [MonoTODO]
121                         get { 
122                                 throw new NotImplementedException ();
123                         }
124                 }
125
126                 #endregion // Properties
127
128                 #region Methods
129
130                 [MonoTODO]
131                 public object Clone () {
132                         throw new NotImplementedException ();
133                 }
134
135                 [MonoTODO]
136                 public long CopyTo (OracleLob destination) {
137                         throw new NotImplementedException ();
138                 }
139
140                 [MonoTODO]
141                 public long CopyTo (OracleLob destination, long destinationOffset) {
142                         throw new NotImplementedException ();
143                 }
144
145                 [MonoTODO]
146                 public long CopyTo (long sourceOffset, OracleLob destination, long destinationOffset, long amount) {
147                         throw new NotImplementedException ();
148                 }
149
150                 [MonoTODO]
151                 public void Dispose () {
152                         throw new NotImplementedException ();
153                 }
154
155                 [MonoTODO]
156                 public override void Flush () {
157                         throw new NotImplementedException ();
158                 }
159
160                 [MonoTODO]
161                 public override int Read (byte[] buffer, int offset, int count) {
162                         throw new NotImplementedException ();
163                 }
164
165                 [MonoTODO]
166                 public override long Seek (long offset, SeekOrigin origin) {
167                         throw new NotImplementedException ();
168                 }
169
170                 [MonoTODO]
171                 public void SetFileName (string directory, string file) {
172                         throw new NotImplementedException ();
173                 }
174
175                 [MonoTODO]
176                 public override void SetLength (long value) {
177                         throw new InvalidOperationException ();
178                 }
179
180                 [MonoTODO]
181                 public override void Write (byte[] buffer, int offset, int count) {
182                         throw new NotSupportedException ();
183                 }
184
185                 #endregion // Methods
186         }
187 }