現在トラノマキアプリでデータを更新する処理を作っています。 このアプリで使うベースとなるデータファイルはネット上に置いてあり、先ずはこれらの更新日を取得する必要があります。オープンな場所のファイル更新日を取得するだけならHttpURLConnectionを使う方法がお手軽で良い感じですが、今回は対象となるサイトにBasic認証を掛けてある為(大した情報は無いのですが保身的な人に知れると面倒なので)ひと工夫必要です。 という訳で、Basic認証を使ってネット上のファイルの更新日を取得する方法を調べてみました。 以下、一部抜粋 private Date getLastModified(String filename) { URL url; Date date = null; try { Authenticator.setDefault(new Authenticator() { protect
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く