⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileoutputstream.java

📁 kaffe是一个java虚拟机的源代码。里面包含了一些java例程和标准的java包。
💻 JAVA
字号:
/* * Java core library component. * * Copyright (c) 1997, 1998 *      Transvirtual Technologies, Inc.  All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */package java.io;public class FileOutputStream  extends OutputStream {static {        System.loadLibrary("io");}private FileDescriptor fd = new FileDescriptor();public FileOutputStream(File file) throws IOException{	this(file.getPath());}public FileOutputStream(FileDescriptor fdObj)	{	final SecurityManager sm = System.getSecurityManager();	if (sm != null)		sm.checkWrite(fdObj);	fd = fdObj;}public FileOutputStream(String name) throws FileNotFoundException{	this(name, false);}public FileOutputStream(String name, boolean append) throws FileNotFoundException{	final SecurityManager sm = System.getSecurityManager();	if (sm != null)		sm.checkWrite(name);	if (!append) {		open(name);	}	else {		openAppend(name);	}}native public void close() throws IOException;protected void finalize() throws IOException{	close();	try {	    super.finalize();	}	catch(Throwable e){	    throw new IOException(e.getMessage());	}}final public FileDescriptor getFD()  throws IOException{	return (fd);}native private void open(String name);native private void openAppend(String name);public void write(byte b[]) throws IOException{	write(b, 0, b.length);}public void write(byte b[], int off, int len) throws IOException{	writeBytes(b, off, len);}native public void write(int b) throws IOException;native private void writeBytes(byte b[], int off, int len);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -