2 // (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
5 // Vladimir Krasnov <vladimirk@mainsoft.com>
6 // Konstantin Triger <kostat@mainsoft.com>
8 // Permission is hereby granted, free of charge, to any person obtaining
9 // a copy of this software and associated documentation files (the
10 // "Software"), to deal in the Software without restriction, including
11 // without limitation the rights to use, copy, modify, merge, publish,
12 // distribute, sublicense, and/or sell copies of the Software, and to
13 // permit persons to whom the Software is furnished to do so, subject to
14 // the following conditions:
16 // The above copyright notice and this permission notice shall be
17 // included in all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 namespace System.Web.J2EE
\r
32 internal class ObjectOutputStream : System.IO.Stream {
\r
33 readonly java.io.ObjectOutput _javaObjectOutput;
\r
35 public ObjectOutputStream(java.io.ObjectOutput stream) {
\r
36 _javaObjectOutput = stream;
\r
39 public override bool CanRead {
\r
45 public override bool CanSeek {
\r
51 public override bool CanWrite {
\r
57 public override void Close() {
\r
58 _javaObjectOutput.close();
\r
61 public override void Flush() {
\r
62 _javaObjectOutput.flush();
\r
65 public override long Length {
\r
67 throw new NotSupportedException();
\r
71 public override long Position {
\r
73 throw new NotSupportedException();
\r
76 throw new NotSupportedException();
\r
80 public override long Seek(long offset, System.IO.SeekOrigin origin) {
\r
81 throw new NotSupportedException();
\r
84 public override void SetLength(long value) {
\r
85 throw new NotSupportedException();
\r
88 public override int Read(byte[] buffer, int offset, int count) {
\r
89 throw new NotSupportedException();
\r
92 public override void Write(byte[] buffer, int offset, int count) {
\r
93 _javaObjectOutput.write( vmw.common.TypeUtils.ToSByteArray(buffer), offset, count );
\r
96 public override void WriteByte(byte value) {
\r
97 _javaObjectOutput.write(value);
\r
100 public java.io.ObjectOutput NativeStream {
\r
101 get {return _javaObjectOutput;}
\r