2 // (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
\r
5 // Vladimir Krasnov <vladimirk@mainsoft.com>
\r
6 // Konstantin Triger <kostat@mainsoft.com>
\r
8 // Permission is hereby granted, free of charge, to any person obtaining
\r
9 // a copy of this software and associated documentation files (the
\r
10 // "Software"), to deal in the Software without restriction, including
\r
11 // without limitation the rights to use, copy, modify, merge, publish,
\r
12 // distribute, sublicense, and/or sell copies of the Software, and to
\r
13 // permit persons to whom the Software is furnished to do so, subject to
\r
14 // the following conditions:
\r
16 // The above copyright notice and this permission notice shall be
\r
17 // included in all copies or substantial portions of the Software.
\r
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
21 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
23 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
24 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
25 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
31 namespace Mainsoft.Web.SessionState
\r
33 public sealed partial class ServletSessionStateStoreProvider
\r
35 sealed class ObjectOutputStream : System.IO.Stream, ObjectOutput
\r
37 readonly ObjectOutput _javaObjectOutput;
\r
39 public ObjectOutputStream (ObjectOutput stream) {
\r
40 _javaObjectOutput = stream;
\r
43 public override bool CanRead {
\r
49 public override bool CanSeek {
\r
55 public override bool CanWrite {
\r
61 public override void Close () {
\r
62 _javaObjectOutput.close ();
\r
65 public override void Flush () {
\r
66 _javaObjectOutput.flush ();
\r
69 public override long Length {
\r
71 throw new NotSupportedException ();
\r
75 public override long Position {
\r
77 throw new NotSupportedException ();
\r
80 throw new NotSupportedException ();
\r
84 public override long Seek (long offset, System.IO.SeekOrigin origin) {
\r
85 throw new NotSupportedException ();
\r
88 public override void SetLength (long value) {
\r
89 throw new NotSupportedException ();
\r
92 public override int Read (byte [] buffer, int offset, int count) {
\r
93 throw new NotSupportedException ();
\r
96 public override void Write (byte [] buffer, int offset, int count) {
\r
97 _javaObjectOutput.write (vmw.common.TypeUtils.ToSByteArray (buffer), offset, count);
\r
100 public override void WriteByte (byte value) {
\r
101 _javaObjectOutput.write (value);
\r
104 public ObjectOutput NativeStream {
\r
105 get { return _javaObjectOutput; }
\r
108 #region ObjectOutput Members
\r
110 public void close () {
\r
111 _javaObjectOutput.close ();
\r
114 public void flush () {
\r
115 _javaObjectOutput.flush ();
\r
118 public void write (sbyte [] __p1, int __p2, int __p3) {
\r
119 _javaObjectOutput.write (__p1, __p2, __p3);
\r
122 public void write (sbyte [] __p1) {
\r
123 _javaObjectOutput.write (__p1);
\r
126 public void write (int __p1) {
\r
127 _javaObjectOutput.write (__p1);
\r
130 public void writeObject (object __p1) {
\r
131 _javaObjectOutput.writeObject (__p1);
\r
136 #region DataOutput Members
\r
139 public void writeBoolean (bool __p1) {
\r
140 _javaObjectOutput.writeBoolean (__p1);
\r
143 public void writeByte (int __p1) {
\r
144 _javaObjectOutput.writeByte (__p1);
\r
147 public void writeBytes (string __p1) {
\r
148 _javaObjectOutput.writeBytes (__p1);
\r
151 public void writeChar (int __p1) {
\r
152 _javaObjectOutput.writeChar (__p1);
\r
155 public void writeChars (string __p1) {
\r
156 _javaObjectOutput.writeChars (__p1);
\r
159 public void writeDouble (double __p1) {
\r
160 _javaObjectOutput.writeDouble (__p1);
\r
163 public void writeFloat (float __p1) {
\r
164 _javaObjectOutput.writeFloat (__p1);
\r
167 public void writeInt (int __p1) {
\r
168 _javaObjectOutput.writeInt (__p1);
\r
171 public void writeLong (long __p1) {
\r
172 _javaObjectOutput.writeLong (__p1);
\r
175 public void writeShort (int __p1) {
\r
176 _javaObjectOutput.writeShort (__p1);
\r
179 public void writeUTF (string __p1) {
\r
180 _javaObjectOutput.writeUTF (__p1);
\r