* @param prefix
* a prefix for the temporary file name, must be at least three
* characters long
- * @param origFile
+ * @param suffixModel
* null or original file - so new file can be given the same suffix
* as the old one
* @return
*/
protected String copyJarEntry(jarInputStreamProvider jprovider,
- String jarEntryName, String prefix, String origFile)
+ String jarEntryName, String prefix, String suffixModel)
{
BufferedReader in = null;
PrintWriter out = null;
String suffix = ".tmp";
- if (origFile == null)
+ if (suffixModel == null)
{
- origFile = jarEntryName;
+ suffixModel = jarEntryName;
}
- int sfpos = origFile.lastIndexOf(".");
- if (sfpos > -1 && sfpos < (origFile.length() - 3))
+ int sfpos = suffixModel.lastIndexOf(".");
+ if (sfpos > -1 && sfpos < (suffixModel.length() - 1))
{
- suffix = "." + origFile.substring(sfpos + 1);
+ suffix = "." + suffixModel.substring(sfpos + 1);
}
try
{
*/
String viewerJarEntryName = getViewerJarEntryName(data.getViewId());
chimeraSessionFile = copyJarEntry(jprovider, viewerJarEntryName,
- "chimera", null);
+ "chimera", ".py");
Set<Entry<File, StructureData>> fileData = data.getFileData()
.entrySet();