Package org.ogf.saga.file

This package provides classes to manipulate the contents of directories or files.

See: Description

Package org.ogf.saga.file Description

This package provides classes to manipulate the contents of directories or files. In addition to the classes described in the language-independent SAGA specifications, this package also contains classes that are extensions of InputStream and OutputStream. These are specific for the Java language bindings and were added because Java programmers are used to them and the Java libraries have various classes that build on top of these,

A File represents an open file descriptor for read/write operations on a physical file. A deviation from the language-independent SAGA specifications is that the read and write methods do not return POSIX error codes in case of an error. Instead, they throw a SagaIOException. If a POSIX error code happens to be available, it is stored inside the exception object.

An Directory extends an NSDirectory with methods to open files and other directories. Some methods have been renamed slightly to avoid conflicts with methods in NSDirectory, as only the type of the return value differs, and Java forbids that.

The possible file flags are defined in the Flags enumeration class, which includes methods to combine them into integers, and to determine if they are set in an integer. These methods are not described in the language-independent SAGA specification, but are added in the Java language bindings because in Java, enumerations cannot be treated as integers. Also, since enumeration classes are not extensible in Java, flags from the logicalfile package and the namespace package are included there as well.

Copyright © 2016 Open Grid Forum. All rights reserved.