1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

update filestream support, unfinished

This commit is contained in:
Kevin Glynn 2011-03-11 11:04:08 +01:00
parent 61c7200264
commit 3fe67bac2d
6 changed files with 182 additions and 3 deletions

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is
Copyright 2007,2008,2009,2010 Rustici Software, LLC
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
-->
<Enum xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
<Imports>
<Import>CS2JNet.System.IO.FileAccess</Import>
</Imports>
<Java>FileAccess</Java>
<Name>System.IO.FileAccess</Name>
<Inherits>
<Type>System.Enum</Type>
</Inherits>
<Members>
<Member>
<Java>${this:16}.Read</Java>
<Name>Read</Name>
</Member>
<Member>
<Java>${this:16}.Write</Java>
<Name>Write</Name>
</Member>
<Member>
<Java>${this:16}.ReadWrite</Java>
<Name>ReadWrite</Name>
</Member>
</Members>
</Enum>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is
Copyright 2007,2008,2009,2010 Rustici Software, LLC
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
-->
<Enum xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
<Imports>
<Import>CS2JNet.System.IO.FileMode</Import>
</Imports>
<Java>FileMode</Java>
<Name>System.IO.FileMode</Name>
<Inherits>
<Type>System.Enum</Type>
</Inherits>
<Members>
<Member>
<Java>${this:16}.CreateNew</Java>
<Name>CreateNew</Name>
</Member>
<Member>
<Java>${this:16}.Create</Java>
<Name>Create</Name>
</Member>
<Member>
<Java>${this:16}.Open</Java>
<Name>Open</Name>
</Member>
<Member>
<Java>${this:16}.OpenOrCreate</Java>
<Name>OpenOrCreate</Name>
</Member>
<Member>
<Java>${this:16}.Truncate</Java>
<Name>Truncate</Name>
</Member>
<Member>
<Java>${this:16}.Append</Java>
<Name>Append</Name>
</Member>
</Members>
</Enum>

View File

@ -9,9 +9,9 @@
-->
<Class xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
<Imports>
<Import>java.io.*</Import>
<Import>CS2JNet.System.IO.FileStreamSupport</Import>
</Imports>
<Java>OutputStream</Java>
<Java>FileStreamSupport</Java>
<Name>System.IO.FileStream</Name>
<Uses />
<Inherits>
@ -22,7 +22,28 @@
<Properties />
<Events />
<Indexers />
<Constructors />
<Constructors>
<Constructor>
<Imports>
<Import>CS2JNet.System.IO.FileStreamSupport</Import>
</Imports>
<Java>new FileStreamSupport(${path}, ${mode}, ${access})</Java>
<Params>
<Param>
<Type>System.String</Type>
<Name>path</Name>
</Param>
<Param>
<Type>System.IO.FileMode</Type>
<Name>mode</Name>
</Param>
<Param>
<Type>System.IO.FileAccess</Type>
<Name>access</Name>
</Param>
</Params>
</Constructor>
</Constructors>
<Fields />
<Casts />
<UnaryOps />

View File

@ -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
}

View File

@ -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
}

View File

@ -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 {
}