iモード携帯電話用Java(iアプリ) Part 6
■ このスレッドは過去ログ倉庫に格納されています
0484isis
NGNGif(point<0 || len<=0) return null;
byte[] ldByte = new byte[len];
InputStream in = null;
try{
in = Connector.openInputStream("scratchpad:///" + Integer.toString(sp) + ";pos="+Integer.toString(point));in.read(ldByte);
in.close();
in = null;
}
catch(Exception e){
if(in!=null){
try{
in.close();
}catch (Exception err) {}
}
in=null;
return null;
}
if (ldByte == null) {
String not = "There is nothing.";
return ldByte = not.getBytes();
}
else
{ return ldByte; }
}
テキストボックスの保存内容が無いときに、メモ欄に ldByte == null を表示したいのですが
ldByte がどうしてもnullにならなくて、空白になってしまいま・・・
スクラッチパッドを初期化してもだめで、
ldByte をint にすると17とでたので、参照があるぽいので
String に直したら変な文字化けぽいのがでます・・
文字が " " でない保存、読み込みは普通にできますが・・
■ このスレッドは過去ログ倉庫に格納されています