java.lang.Object | +--com.dalsemi.onewire.application.file.OWFileDescriptor
Instances of the 1-Wire file descriptor class serve as an opaque handle
to the underlying machine-specific structure representing an open
file, an open socket, or another source or sink of bytes. The
main practical use for a file descriptor is to create a
OWFileInputStream
or OWFileOutputStream
to
contain it.
Applications should not create their own file descriptors.
OWFile
,
OWFileInputStream
,
OWFileOutputStream
Constructor Summary | |
OWFileDescriptor()
Construct an invalid 1-Wire FileDescriptor |
Method Summary | |
void |
sync()
Force all system buffers to synchronize with the underlying device. |
boolean |
valid()
Tests if this file descriptor object is valid. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OWFileDescriptor()
Method Detail |
public boolean valid()
true
if the file descriptor object represents a
valid, open file, socket, or other active I/O connection;
false
otherwise.public void sync() throws OWSyncFailedException
This method may be called multiple times if the source of OWSyncFailedException has been rectified (1-Wire device was reattached to the network).
OWSyncFailedException
- Thrown when the buffers cannot be flushed,
or because the system cannot guarantee that all the
buffers have been synchronized with physical media.