Package org.apache.harmony.nio.internal

Examples of org.apache.harmony.nio.internal.WriteOnlyFileChannel


  public static FileChannel getFileChannel(Object stream, long fd, int mode) {
        switch(mode){
        case IFileSystem.O_RDONLY:
            return new ReadOnlyFileChannel(stream, fd);
        case IFileSystem.O_WRONLY:
            return new WriteOnlyFileChannel(stream, fd);
        case IFileSystem.O_RDWR:
            return new ReadWriteFileChannel(stream, fd);
        case IFileSystem.O_RDWRSYNC:
            return new ReadWriteFileChannel(stream, fd);
        case IFileSystem.O_APPEND:
            return new WriteOnlyFileChannel(stream, fd, true);
        default:
            // nio.09=Unknown file channel type: {0}
            throw new RuntimeException(Messages.getString("nio.09", mode))//$NON-NLS-1$
        }
  }
View Full Code Here


    public static FileChannel getFileChannel(Object stream, long fd, int mode) {
        switch (mode) {
            case IFileSystem.O_RDONLY:
                return new ReadOnlyFileChannel(stream, fd);
            case IFileSystem.O_WRONLY:
                return new WriteOnlyFileChannel(stream, fd);
            case IFileSystem.O_RDWR:
                return new ReadWriteFileChannel(stream, fd);
            case IFileSystem.O_RDWRSYNC:
                return new ReadWriteFileChannel(stream, fd);
            case IFileSystem.O_APPEND:
                return new WriteOnlyFileChannel(stream, fd, true);
            default:
                // nio.09=Unknown file channel type: {0}
                throw new RuntimeException(Messages.getString("nio.09", mode)); //$NON-NLS-1$
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.nio.internal.WriteOnlyFileChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.