{{theTime}}

Search This Blog

Total Pageviews

What is IllegalArgumentException: Prefix string too short

Check if your code creating temp file using File.createTemFile(prefix,suffic, new File("test") method with prefix <3 characters.="characters." p="p">
File API doc:


public static File createTempFile(String prefix,
                                  String suffix,
                                  File directory)
                           throws IOException
Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. If this method returns successfully then it is guaranteed that: 

Throws:
IllegalArgumentException - If the prefix argument contains fewer than three characters 

No comments:

Java Sequenced Collection Java Sequenced Collection The Sequenced Collection feature was introduced in Jav...