@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("ModeFlags(").append(flags).append("): "); if (isAppendable()) buf.append("APPENDABLE "); if (isBinary()) buf.append("BINARY "); if (isCreate()) buf.append("CREATE "); if (isExclusive()) buf.append("EXCLUSIVE "); if (isReadOnly()) buf.append("READONLY "); if (isText()) buf.append("TEXT "); if (isTemporary()) buf.append("TMPFILE "); if (isTruncate()) buf.append("TRUNCATE "); if (isWritable()) { if (isReadable()) { buf.append("RDWR"); } else { buf.append("WRITABLE "); } } return buf.toString(); }
@Override public String toString() { StringBuilder buf = new StringBuilder("ModeFlags(" + flags + "): "); if (isAppendable()) buf.append("APPENDABLE "); if (isBinary()) buf.append("BINARY "); if (isCreate()) buf.append("CREATE "); if (isExclusive()) buf.append("EXCLUSIVE "); if (isReadOnly()) buf.append("READONLY "); if (isText()) buf.append("TEXT "); if (isTruncate()) buf.append("TRUNCATE "); if (isWritable()) { if (isReadable()) { buf.append("RDWR"); } else { buf.append("WRITABLE "); } } return buf.toString(); }
@Override public String toString() { StringBuilder buf = new StringBuilder("ModeFlags(" + flags + "): "); if (isAppendable()) buf.append("APPENDABLE "); if (isBinary()) buf.append("BINARY "); if (isCreate()) buf.append("CREATE "); if (isExclusive()) buf.append("EXCLUSIVE "); if (isReadOnly()) buf.append("READONLY "); if (isText()) buf.append("TEXT "); if (isTruncate()) buf.append("TRUNCATE "); if (isWritable()) { if (isReadable()) { buf.append("RDWR"); } else { buf.append("WRITABLE "); } } return buf.toString(); }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("ModeFlags(").append(flags).append("): "); if (isAppendable()) buf.append("APPENDABLE "); if (isBinary()) buf.append("BINARY "); if (isCreate()) buf.append("CREATE "); if (isExclusive()) buf.append("EXCLUSIVE "); if (isReadOnly()) buf.append("READONLY "); if (isText()) buf.append("TEXT "); if (isTemporary()) buf.append("TMPFILE "); if (isTruncate()) buf.append("TRUNCATE "); if (isWritable()) { if (isReadable()) { buf.append("RDWR"); } else { buf.append("WRITABLE "); } } return buf.toString(); }
private static Stream maybeWrapWithLineEndingWrapper(Stream stream, ModeFlags modes) { if (modes.isText() || // FIXME: Remove this one textmode is part of transcoding. (Platform.IS_WINDOWS && stream.getDescriptor().getChannel() instanceof SeekableByteChannel && !modes.isBinary())) { return new CRLFStreamWrapper(stream); } return stream; }
private static Stream maybeWrapWithLineEndingWrapper(Stream stream, ModeFlags modes) { if (modes.isText() || // FIXME: Remove this one textmode is part of transcoding. (Platform.IS_WINDOWS && stream.getDescriptor().getChannel() instanceof SeekableByteChannel && !modes.isBinary())) { return new CRLFStreamWrapper(stream); } return stream; }
private static Stream maybeWrapWithLineEndingWrapper(Stream stream, ModeFlags modes) { if (modes.isText() || // FIXME: Remove this one textmode is part of transcoding. (Platform.IS_WINDOWS && stream.getDescriptor().getChannel() instanceof FileChannel && !modes.isBinary())) { return new CRLFStreamWrapper(stream); } return stream; }
private static Stream maybeWrapWithLineEndingWrapper(Stream stream, ModeFlags modes) { if (modes.isText() || // FIXME: Remove this one textmode is part of transcoding. (Platform.IS_WINDOWS && stream.getDescriptor().getChannel() instanceof FileChannel && !modes.isBinary())) { return new CRLFStreamWrapper(stream); } return stream; }
protected void openInternal(String path, String modeString) { if (path.startsWith("jar:")) { path = path.substring(4); } MakeOpenFile(); IOOptions modes = newIOOptions(getRuntime(), modeString); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); if (getRuntime().is1_9() && modes.getModeFlags().isBinary()) enc = ASCIIEncoding.INSTANCE; openFile.setPath(path); openFile.setMainStream(fopen(path, modes.getModeFlags())); }
protected void openInternal(String path, String modeString) { if (path.startsWith("jar:")) { path = path.substring(4); } MakeOpenFile(); IOOptions modes = newIOOptions(getRuntime(), modeString); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); if (getRuntime().is1_9() && modes.getModeFlags().isBinary()) enc = ASCIIEncoding.INSTANCE; openFile.setPath(path); openFile.setMainStream(fopen(path, modes.getModeFlags())); }