From 3fe67bac2df4fee87f44f9852236f0827972bad1 Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Fri, 11 Mar 2011 11:04:08 +0100 Subject: [PATCH] update filestream support, unfinished --- .../NetFramework/System/IO/FileAccess.xml | 33 ++++++++++++++ .../NetFramework/System/IO/FileMode.xml | 45 +++++++++++++++++++ .../NetFramework/System/IO/FileStream.xml | 27 +++++++++-- .../src/CS2JNet/System/IO/FileAccess.java | 26 +++++++++++ .../src/CS2JNet/System/IO/FileMode.java | 26 +++++++++++ .../CS2JNet/System/IO/FileStreamSupport.java | 28 ++++++++++++ 6 files changed, 182 insertions(+), 3 deletions(-) create mode 100644 CS2JLibrary/NetFramework/System/IO/FileAccess.xml create mode 100644 CS2JLibrary/NetFramework/System/IO/FileMode.xml create mode 100644 CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java create mode 100644 CS2JLibrary/src/CS2JNet/System/IO/FileMode.java create mode 100755 CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java diff --git a/CS2JLibrary/NetFramework/System/IO/FileAccess.xml b/CS2JLibrary/NetFramework/System/IO/FileAccess.xml new file mode 100644 index 0000000..c14d7e7 --- /dev/null +++ b/CS2JLibrary/NetFramework/System/IO/FileAccess.xml @@ -0,0 +1,33 @@ + + + + + CS2JNet.System.IO.FileAccess + + FileAccess + System.IO.FileAccess + + System.Enum + + + + ${this:16}.Read + Read + + + ${this:16}.Write + Write + + + ${this:16}.ReadWrite + ReadWrite + + + diff --git a/CS2JLibrary/NetFramework/System/IO/FileMode.xml b/CS2JLibrary/NetFramework/System/IO/FileMode.xml new file mode 100644 index 0000000..f034754 --- /dev/null +++ b/CS2JLibrary/NetFramework/System/IO/FileMode.xml @@ -0,0 +1,45 @@ + + + + + CS2JNet.System.IO.FileMode + + FileMode + System.IO.FileMode + + System.Enum + + + + ${this:16}.CreateNew + CreateNew + + + ${this:16}.Create + Create + + + ${this:16}.Open + Open + + + ${this:16}.OpenOrCreate + OpenOrCreate + + + ${this:16}.Truncate + Truncate + + + ${this:16}.Append + Append + + + diff --git a/CS2JLibrary/NetFramework/System/IO/FileStream.xml b/CS2JLibrary/NetFramework/System/IO/FileStream.xml index cb8f9b0..7aa2130 100644 --- a/CS2JLibrary/NetFramework/System/IO/FileStream.xml +++ b/CS2JLibrary/NetFramework/System/IO/FileStream.xml @@ -9,9 +9,9 @@ --> - java.io.* + CS2JNet.System.IO.FileStreamSupport - OutputStream + FileStreamSupport System.IO.FileStream @@ -22,7 +22,28 @@ - + + + + CS2JNet.System.IO.FileStreamSupport + + new FileStreamSupport(${path}, ${mode}, ${access}) + + + System.String + path + + + System.IO.FileMode + mode + + + System.IO.FileAccess + access + + + + diff --git a/CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java b/CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java new file mode 100644 index 0000000..9261fba --- /dev/null +++ b/CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java @@ -0,0 +1,26 @@ +/* + Copyright 2007,2008,2009,2010 Rustici Software, LLC + Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Author(s): + + Kevin Glynn (kevin.glynn@twigletsoftware.com) +*/ + +package CS2JNet.System.IO; + +public enum FileAccess { + Read, Write, ReadWrite +} diff --git a/CS2JLibrary/src/CS2JNet/System/IO/FileMode.java b/CS2JLibrary/src/CS2JNet/System/IO/FileMode.java new file mode 100644 index 0000000..f5a9487 --- /dev/null +++ b/CS2JLibrary/src/CS2JNet/System/IO/FileMode.java @@ -0,0 +1,26 @@ +/* + Copyright 2007,2008,2009,2010 Rustici Software, LLC + Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Author(s): + + Kevin Glynn (kevin.glynn@twigletsoftware.com) +*/ + +package CS2JNet.System.IO; + +public enum FileMode { + CreateNew, Create, Open, OpenOrCreate, Truncate, Append +} \ No newline at end of file diff --git a/CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java b/CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java new file mode 100755 index 0000000..dfc27ad --- /dev/null +++ b/CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java @@ -0,0 +1,28 @@ +/* + Copyright 2007,2008,2009,2010 Rustici Software, LLC + Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Author(s): + + Kevin Glynn (kevin.glynn@twigletsoftware.com) +*/ + +package CS2JNet.System.IO; + + +public class FileStreamSupport { + + +}