Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 5.1.0sp9 API Reference

## weblogic.io.common
Interface IOServicesDef

public interface IOServicesDef

Interface that defines an IO services factory. Use this interface to manufacture objects for WebLogic File System access. The IO services factory methods take the place of constructors for objects that are used by WebLogic File System services.

Here's an example of how this interface is used in the process of writing a remote file:

       T3Client t3 = new T3Client("t3://host:port");

       // Get file system, file, and output stream.
       T3FileSystem myfs = t3.services.io().getFileSystem("myFileSystem");
       T3File myFile = myfs.getFile("someDirectory/someFile");
       T3FileOutputStream os = myFile.getFileOutputStream();

       // Use normal OutputStream operations on os to
       // write a byte "b" to the output stream
       os.write(b);

Author:
  Copyright (c) 1996-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `T3ServicesDef`, `T3FileSystem`

Method Summary
`T3File` | `getFile(java.lang.String path)` This method takes a file system name and a file name combined in a single String, gets the file system, gets the file from the file system, and returns the file.
`T3FileInputStream` | `getFileInputStream(java.lang.String path)` Convenience method that calls getFile(path) and then invokes the getFileInputStream() method of the resulting T3File.
`T3FileInputStream` | `getFileInputStream(java.lang.String path, int bufferSize, int readAhead)` Convenience method that calls getFile(path) and then invokes the getFileInputStream(bufferSize, readAhead) method of the resulting T3File.
`T3FileInputStream` | `getFileInputStream(T3File file)` Convenience method that invokes the getFileInputStream() method of a T3File.
`T3FileInputStream` | `getFileInputStream(T3File file, int bufferSize, int readAhead)` Convenience method that invokes the getFileInputStream(bufferSize, readAhead) method of a T3File.
`T3FileOutputStream` | `getFileOutputStream(java.lang.String path)` Convenience method that calls getFile(path) and then invokes the getFileOutputStream() method of the resulting T3File.
`T3FileOutputStream` | `getFileOutputStream(java.lang.String path, int bufferSize, int writeBehind)` Convenience method that calls getFile(path) and then invokes the getFileOutputStream(bufferSize, writeBehind) method of the resulting T3File.
`T3FileOutputStream` | `getFileOutputStream(T3File file)` Convenience method that invokes the getFileOutputStream() method of a T3File.
`T3FileOutputStream` | `getFileOutputStream(T3File file, int bufferSize, int writeBehind)` Convenience method that invokes the getFileOutputStream(bufferSize, writeBehind) method of a T3File.
`T3FileSystem` | `getFileSystem(java.lang.String fileSystemName)` This method provides the primary file service of the IOServices object - it produces T3FileSystem objects given their names.
`java.util.Enumeration` | `listFileSystems()` This method produces the names of all the file systems on the server.

Method Detail

### getFileSystem

    public T3FileSystem getFileSystem(java.lang.String fileSystemName)
                               throws T3Exception

  This method provides the primary file service of the IOServices object - it produces T3FileSystem objects given their names.

  Parameters:
    `fileSystemName` - The name of the file system.
  Returns:
    the T3FileSystem with the given name. If the name is empty or null, returns an object representing the local file system on the client. Otherwise, returns an object representing a remote file system on the server.
  Throws:
    T3Exception - if the fileSystem does not exist or cannot be accessed.

### listFileSystems

    public java.util.Enumeration listFileSystems()
                                          throws T3Exception

  This method produces the names of all the file systems on the server.

  Returns:
    the names of all the file systems on the server as an Enumeration of Strings.

### getFile

    public T3File getFile(java.lang.String path)
                   throws T3Exception

  This method takes a file system name and a file name combined in a single String, gets the file system, gets the file from the file system, and returns the file.

  Parameters:
    `path` - The file system name and file name in the form //fsname/filename or \\fsname\filename.
  Returns:
    getFileSystem(fsname).getFile(filename). If path does not have the above form or if fsname is empty, uses the local file system.
  Throws:
    T3Exception - if the fileSystem does not exist or cannot be accessed.

### getFileInputStream

    public T3FileInputStream getFileInputStream(T3File file)
                                         throws T3Exception

  Convenience method that invokes the getFileInputStream() method of a T3File. Returns a new T3FileInputStream object for reading from the file. If it is remote, uses the default bufferSize and readAhead.

  Parameters:
    `file` - The file from which to get the stream
  Returns:
    the T3FileInputStream
  Throws:
    T3Exception - if there is an error creating the stream

### getFileInputStream

    public T3FileInputStream getFileInputStream(T3File file,
                                                int bufferSize,
                                                int readAhead)
                                         throws T3Exception

  Convenience method that invokes the getFileInputStream(bufferSize, readAhead) method of a T3File. Returns a new T3FileInputStream object for reading from the file. If it is remote, uses the specified bufferSize and readAhead. The size of the buffer is in bytes, and readAhead refers to the number of buffers fetched in advance of the user's request.

  Parameters:
    `file` - The file from which to get the stream
    `bufferSize` - Size of transfer buffers in bytes
    `readAhead` - Number of transfer buffers fetched in advance
  Returns:
    the T3FileInputStream
  Throws:
    T3Exception - if there is an error

### getFileOutputStream

    public T3FileOutputStream getFileOutputStream(T3File file)
                                           throws T3Exception

  Convenience method that invokes the getFileOutputStream() method of a T3File. Returns a new T3FileOutputStream object for writing to the file. If it is remote, uses the default bufferSize and writeBehind.

  Parameters:
    `file` - The file from which to get the stream
  Returns:
    the T3FileOutputStream
  Throws:
    T3Exception - if there is an error creating the stream

### getFileOutputStream

    public T3FileOutputStream getFileOutputStream(T3File file,
                                                  int bufferSize,
                                                  int writeBehind)
                                           throws T3Exception

  Convenience method that invokes the getFileOutputStream(bufferSize, writeBehind) method of a T3File. Returns a new T3FileOutputStream object for writing to the file. If it is remote, uses the specified bufferSize and writeBehind. The size of the buffer is in bytes, and writeBehind refers to the number of unwritten buffers that can be outstanding before the next write blocks.

  Parameters:
    `file` - The file from which to get the stream
    `bufferSize` - Size of transfer buffers in bytes
    `writeBehind` - Number of unwritten transfer buffers
  Returns:
    the T3FileOutputStream
  Throws:
    T3Exception - if there is an error

### getFileInputStream

    public T3FileInputStream getFileInputStream(java.lang.String path)
                                         throws T3Exception

  Convenience method that calls getFile(path) and then invokes the getFileInputStream() method of the resulting T3File. Returns a new T3FileInputStream object for reading from the file. If it is remote, uses the default bufferSize and readAhead.

  Parameters:
    `path` - The name of the file from which to get the stream
  Returns:
    the T3FileInputStream
  Throws:
    T3Exception - if there is an error creating the stream

### getFileInputStream

    public T3FileInputStream getFileInputStream(java.lang.String path,
                                                int bufferSize,
                                                int readAhead)
                                         throws T3Exception

  Convenience method that calls getFile(path) and then invokes the getFileInputStream(bufferSize, readAhead) method of the resulting T3File. Returns a new T3FileInputStream object for reading from the file. If it is remote, uses the specified bufferSize and readAhead. The size of the buffer is in bytes, and readAhead refers to the number of buffers fetched in advance of the user's request.

  Parameters:
    `path` - The name of the file from which to get the stream
    `bufferSize` - Size of transfer buffers in bytes
    `readAhead` - Number of transfer buffers fetched in advance
  Returns:
    the T3FileInputStream
  Throws:
    T3Exception - if there is an error creating the stream

### getFileOutputStream

    public T3FileOutputStream getFileOutputStream(java.lang.String path)
                                           throws T3Exception

  Convenience method that calls getFile(path) and then invokes the getFileOutputStream() method of the resulting T3File. Returns a new T3FileOutputStream object for writing to the file. If it is remote, uses the default bufferSize and writeBehind.

  Parameters:
    `path` - The name of the file from which to get the stream
  Returns:
    the T3FileOutputStream
  Throws:
    T3Exception - if there is an error creating the stream

### getFileOutputStream

    public T3FileOutputStream getFileOutputStream(java.lang.String path,
                                                  int bufferSize,
                                                  int writeBehind)
                                           throws T3Exception

  Convenience method that calls getFile(path) and then invokes the getFileOutputStream(bufferSize, writeBehind) method of the resulting T3File. Returns a new T3FileOutputStream object for writing to the file. If it is remote, uses the specified bufferSize and writeBehind. The size of the buffer is in bytes, and writeBehind refers to the number of unwritten buffers that can be outstanding before the next write blocks.

  Parameters:
    `path` - The name of the file from which to get the stream
    `bufferSize` - Size of transfer buffers in bytes
    `writeBehind` - Number of unwritten transfer buffers
  Returns:
    the T3FileOutputStream
  Throws:
    T3Exception - if there is an error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD