インフォ FAQ
言語 環境比較
 
Index
 
  Processing 1.0 _ALPHAリファレンスは開発途中である。
もしエラーやコメントがあれば、reas at groupc.netへメールして下さい。
Name  

loadBytes()

   
Examples  
// バイナリー値でファイル読み込んで開く 
byte b[] = loadBytes("something.dat"); 
 
// print each value, from 0 to 255 
for (int i = 0; i < b.length; i++) { 
  // every tenth number, start a new line 
  if ((i % 10) = 0) { 
    println(); 
  } 
 
  // バイトは -128 から 127の値で、これを 0 から 255へコンバートする 
  int a = b[i] & 0xff; 
  print(a + " "); 
} 
// 最後に空白行をプリントする 
println(); 
 

Description

 

 

ファイルの内容かurlを読み込み、各々の行の文字の配列をつくる。もしもファイルが特定されれば、sketchの"data"ディレクトリーフォルダーに置かれていなければならない
   
Syntax  
loadBytes(filename);
   
Parameters  
filename   文字列: ファイルの名前か、ロードするurl
   
Returns   byte[]
   
Usage   Web & Application
   
Related   loadStream()
loadStrings()
writeStrings()
writeBytes()
   
© 2004- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas