Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[JavaHouse-Brewers:18524] RuntimeとFileOutp utStream

21 views
Skip to first unread message

owner-ja...@java-house.etl.go.jp

unread,
Aug 10, 1998, 3:00:00 AM8/10/98
to JavaHouse Brewers ML
神奈川大の木川と申します

以前にUNIXのシステムをJAVAのプログラムに書き込む時はRuntimeクラスを、
ファイルに文章を書き込むときは、FileOutputStreamを使うと教えていただいた
のですが
本を読んでもいまいちよく分からず、プログラムを組む事ができません
そこで質問に答えていただきたいのですが・・・

まずは、Runtimeクラス

public class java.lang.Runtime
extends java.lang.Object
{
public Process exec(String command);
public Process exec(Srring command, String envp[]);
public Process exec(String cmdarray[]);
public Process exec(String cmdarray[],String envp[]);
public void exit(int status);
public long freeMemory();
public void gc();
public InputStream
getLocalizedInputStream(InputStream in);
public Outputstream
getLocalizedOutputStream(OutputStream out);
public static Runtime getRuntime();
public void load(String filename);
public loadLibrary(String libname);
public runFinalization();
public long totalMemory();
public void traceInstructions(boolean on);
public void traceMethodCalls(boolean on);
}

というプログラムが本に載っていたのですが、いまいちよく分かりません
特に、envp[]、cmdarray[]、int status、InputStream in、OutputStream
out
String filename、String libname、boolean onというのは何でしょうか?
私の勉強不足なのでしょうが、本の記述を読んでも理解できませんでした
このパラメータを変える事でプログラムが動くのでしょうか?
また、このパラメータとはどういう物なのでしょうか?


もう一つなのですが、FileOutputStreamクラスについてなのですが
public class java.io.FileOutputStream
extends java.io.OutputStream
{
public FileOutputStream(File file);
public FileOutputStream(FileDescriptor fd0bj);
public FileOutputStream(String name);

public void close()
protected void finalize();
public final FileDescriotor getFD();
public void write(byte b[]);
public void write(byte b[],int off,int len);
public void write(int b);

}

こちらもさきほどと質問が一緒なんですが
fd0bj、b、off、lenとはというのは何でしょうか?

ちなみに、本の題名は
「JavaAPI アプリケーションプログラミング インターフェース Vol.1」
という本です

このようなことをメールに書くと、著作権違法になるのでしょうか?

では、お願いします

0 new messages