135 lines
9.3 KiB
HTML
135 lines
9.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Integrated file system" />
|
|
<meta name="abstract" content="The integrated file system classes allow a Java program to access files in the integrated file system of an iSeries server as a stream of bytes or a stream of characters. The integrated file system classes were created because the java.io package does not provide file redirection and other iSeries functionality." />
|
|
<meta name="description" content="The integrated file system classes allow a Java program to access files in the integrated file system of an iSeries server as a stream of bytes or a stream of characters. The integrated file system classes were created because the java.io package does not provide file redirection and other iSeries functionality." />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="ifs" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Integrated file system</title>
|
|
</head>
|
|
<body id="ifs"><a name="ifs"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Integrated file system</h1>
|
|
<div><p>The integrated file system classes allow a Java™ program
|
|
to access files in the integrated file system of an iSeries™ server as a stream of bytes or
|
|
a stream of characters. The integrated file system classes were created because
|
|
the java.io package does not provide file redirection and other iSeries functionality.</p>
|
|
<div class="section"><p>The function that is provided by the IFSFile classes is a superset
|
|
of the function provided by the file IO classes in the java.io package. All
|
|
methods in java.io FileInputStream, FileOutputStream, and RandomAccessFile
|
|
are in the integrated file system classes.</p>
|
|
<p>In addition, the classes
|
|
contain methods to do the following:</p>
|
|
<ul><li>Specify a file sharing mode to deny access to the file while it is in
|
|
use</li>
|
|
<li>Specify a file creation mode to open, create, or replace the file</li>
|
|
<li>Lock a section of the file and deny access to that part of the file while
|
|
it is in use</li>
|
|
<li>List the contents of a directory more efficiently</li>
|
|
<li>Cache the contents of a directory to improve performance by limiting
|
|
calls to the server</li>
|
|
<li>Determine the number of bytes available on the server file system</li>
|
|
<li>Allow a Java applet to access files in the server file system</li>
|
|
<li>Read and write data as text instead of as binary data</li>
|
|
<li>Determine the type of the file object (logical, physical, save, and so
|
|
on) when the object is in the QSYS.LIB file system</li>
|
|
</ul>
|
|
<p>Through the integrated file system classes, the Java program
|
|
can directly access stream files on the iSeries. The Java program can still use the java.io package,
|
|
but the client operating system must then provide a method of redirection.
|
|
For example, if the Java program is running on a Windows<sup>®</sup> 95
|
|
or Windows
|
|
NT<sup>®</sup> operating system, the Network Drives function of iSeries Access
|
|
for Windows is
|
|
required to redirect java.io calls to the iSeries. With the integrated file system
|
|
classes, you do not need iSeries Access for Windows.</p>
|
|
<p>A required parameter
|
|
of the integrated file system classes is the <a href="javadoc/com/ibm/as400/access/AS400.html#NAVBAR_TOP"> AS400</a> object that represents the iSeries system that contains the file.
|
|
Using the integrated file system classes causes the AS400 object to connect
|
|
to the iSeries.
|
|
See <a href="mngcon.htm#mngcon">managing connections</a> for information
|
|
about managing connections.</p>
|
|
<p>The integrated file system classes require
|
|
the hierarchical name of the object in the integrated file system. Use the
|
|
forward slash as the path separator character. The following example shows
|
|
how to access FILE1 in directory path DIR1/DIR2:</p>
|
|
<pre> /DIR1/DIR2/FILE1</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Integrated file system classes</h4><p>The following table
|
|
lists the integrated file system classes:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr class="tablemainheaderbar"><th valign="top" width="50%" id="d0e112">Integrated file system class</th>
|
|
<th valign="top" width="50%" id="d0e114">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsfile.htm#ifsfile">IFSFile</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents a file in the integrated file system</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsjava.htm#ifsjava">IFSJavaFile</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents a file in the integrated file system (extends java.io.File)</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsfis.htm#ifsfis">IFSFileInputStream</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents an input stream for reading data from an iSeries file</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifstfis.htm#ifstfis"> IFSTextFileInputStream</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents a stream of character data read from a file (deprecated)</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><img src="./delta.gif" alt="Start of change" /><a href="ifsfilereader.htm#ifsfilereader">IFSFileReader</a><img src="./deltaend.gif" alt="End of change" /></td>
|
|
<td valign="top" width="50%" headers="d0e114 "><img src="./delta.gif" alt="Start of change" />Use this class for reading character files in the integrated
|
|
file system.<img src="./deltaend.gif" alt="End of change" /></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsfos.htm#ifsfos"> IFSFileOutputStream</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents an output stream for writing data to an iSeries file</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><img src="./delta.gif" alt="Start of change" /><a href="ifsfilewriter.htm#ifsfilewriter">IFSFileWriter</a><img src="./deltaend.gif" alt="End of change" /></td>
|
|
<td valign="top" width="50%" headers="d0e114 "><img src="./delta.gif" alt="Start of change" />Use IFSFileWriter for writing character files in the
|
|
integrated file system.<img src="./deltaend.gif" alt="End of change" /></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifstfos.htm#ifstfos"> IFSTextFileOutputStream</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents a stream of character data being written to a file (deprecated)</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsraf.htm#ifsraf"> IFSRandomAccessFile</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Represents a file on the iSeries for reading and writing data</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><a href="ifsfd.htm#ifsfd">IFSFileDialog</a></td>
|
|
<td valign="top" width="50%" headers="d0e114 ">Allows the user to move within the file system and to select a file
|
|
within the file system</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e112 "><img src="./delta.gif" alt="Start of change" /><a href="ifssystemview.htm#ifssystemview">IFSSystemView</a><img src="./deltaend.gif" alt="End of change" /></td>
|
|
<td valign="top" width="50%" headers="d0e114 "><img src="./delta.gif" alt="Start of change" />IFSSystemView provides a gateway to the iSeries integrated file system, for use
|
|
when constructing javax.swing.JFileChooser objects.<img src="./deltaend.gif" alt="End of change" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section"><p> <strong><span class="synph" id="ifs__examplesifs"><a name="ifs__examplesifs"><!-- --></a><span class="kwd"></span></span>Examples: Using
|
|
integrated file system classes</strong></p>
|
|
<p><a href="ifscopyfileexample.htm#ifscopyfileexample">Example: Using IFS classes to copy a file from one directory to another</a> shows
|
|
how to use the integrated file system classes to copy a file from one directory
|
|
to another on the iSeries.</p>
|
|
<p><a href="ifslistexample.htm#ifslistexample">Example: Using the IFS classes to list the contents of a directory</a> shows
|
|
how to use the integrated file system classes to list the contents of a directory
|
|
on the iSeries.</p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |