Uses of Class
java.nio.channels.FileChannel
| Package | Description |
|---|---|
| java.io | |
| java.nio | |
| java.nio.channels |
-
Uses of FileChannel in java.io
Methods in java.io that return FileChannel Modifier and Type Method Description FileChannelFileInputStream. getChannel()Returns a read-onlyFileChannelthat shares its position with this stream.FileChannelFileOutputStream. getChannel()Returns a write-onlyFileChannelthat shares its position with this stream.FileChannelRandomAccessFile. getChannel()Gets this file'sFileChannelobject. -
Uses of FileChannel in java.nio
Methods in java.nio that return FileChannel Modifier and Type Method Description static FileChannelNioUtils. newFileChannel(Object stream, FileDescriptor fd, int mode)Helps bridge between io and nio.Methods in java.nio with parameters of type FileChannel Modifier and Type Method Description static FileDescriptorNioUtils. getFD(FileChannel fc)Returns the int file descriptor from within the given FileChannel 'fc'. -
Uses of FileChannel in java.nio.channels
Methods in java.nio.channels that return FileChannel Modifier and Type Method Description FileChannelFileLock. channel()Returns the lock'sFileChannel.abstract FileChannelFileChannel. position(long offset)Sets the file position pointer to a new value.abstract FileChannelFileChannel. truncate(long size)Truncates the file underlying this channel to a given size.Constructors in java.nio.channels with parameters of type FileChannel Constructor Description FileLock(FileChannel channel, long position, long size, boolean shared)Constructs a new file lock instance for a given channel.