2016-05-16 7 views
1

私はオーディオを録音しようとしていますが、この例ではcodename one captureを使用しています。コードネーム1、キャプチャオーディオ

は私が

Util.copy(fs.openInputStream(file), fs.openOutputStream(filePath)); 

Utilのクラスはメソッドcopy 見つけることができません。この行にエラーを取得していますこれは、あなたがcom.codename1.io.Utilなく使用していることを確認してください私のコード

FileSystemStorage fs = FileSystemStorage.getInstance(); 
String recordingsDir = fs.getAppHomePath() + "recordings/"; 
fs.mkdir(recordingsDir); 
try { 
    String file = Capture.captureAudio(); 
    if(file != null) { 
      SimpleDateFormat sd = new SimpleDateFormat("yyyy-MMM-dd-kk-mm"); 
      String fileName =sd.format(new Date()); 
      String filePath = recordingsDir + fileName; 
      Util.copy(fs.openInputStream(file), fs.openOutputStream(filePath)); //stuck here 
    } 
}catch(IOException err) { 
     System.out.println(err); 
    } 

答えて

1

です別のパッケージのUtilクラス

関連する問題