OracleブログにJavaプログラミングに関するちょっとしたティップが「Tip #13 java.io.File Surprises (Byron Nevins)」として掲載されている。java.io.Fileの絶対パスに関する扱いが勘違いしやすいものだから注意するように、といった内容になっている。 掲載されている ...
Streamの追加に伴いjava.ioパッケージやjava.nioパッケージにも変更が加えられており、java.nio.files.FilesなどからStreamを生成するためのメソッドが追加されている。 以下java.nio.files.Filesに新たに追加されたメソッドの使用例だ。 // カレントディレクトリのファイル ...
The article Secure Coding: Preventing unauthorized access through path traversal (CWE-22) has already described the dangers posed by the critical vulnerability CWE-22 (path traversal) in software ...
In the blog post Java SE 7 Brings Better File Handling than Ever to Groovy, I discussed how the addition of NIO.2 features in JDK 7 means better file handling for Groovy scripts. My particular focus ...
Webアプリケーションからファイルを読み込む場合、システムに依存したパス名を指定して入力ストリームを取得して行います。このTipsでは、Webアプリケーション内の相対パスを絶対パスに変換し、ファイルを読み込む方法を紹介します。 ファイルを ...