{{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:

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...