User Ratings
Rate This Project
Login To Rate This Project
Featured Reviews
Highest Rated
very good
Lowest Rated
I just downloaded from Sourceforge.net the latest OpenCHAT (both OpenCHAT.jar, and OpenCHAT.src.zip), trying to implement them on some environments, but I found out that Worker.java file from (OpenCHAT.src.zip) is not in good shape.
Then I tried to decompile Worker.class from OpenCHAT.jar, but even in this case, the resulting Worker.java file is not in good shape.
In both of them , as an example the method httpFile() contains this corrupted sequence (handleClient method also is corrupted):
boolean httpFile(String fileString, PrintStream ps)
{
File file;
String fileName;
String contentType;
if(mimeTypes.isEmpty())
loadMimeTypes();
file = new File(fileString);
fileName = file.getName();
String fileExt = fileName.lastIndexOf(".") >= 0 ? fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase() : "";
if(mimeTypes.containsKey(fileExt))
contentType = (String)mimeTypes.get(fileExt);
else
contentType = "text/plain";
byte buffer[] = new byte[2048];
FileInputStream in = new FileInputStream(file);
boolean OK = printHeaders(ps, contentType + "\r\n\r\n");
int n;
while((n = in.read(buffer)) > 0)
ps.write(buffer, 0, n);
break MISSING_BLOCK_LABEL_197;
FileNotFoundException e;
e;
boolean flag;
error = "File not found!";
flag = false;
return flag;
e;
error = "Couldn't read from file!";
flag = false;
return flag;
Exception exception;
exception;
throw exception;
OpenCHAT.p("SENT " + contentType + " " + fileName + " OK");
return true;
}
&&&&&&&&&
Having said that can you please send a good Worker.java source code, please ?
User Reviews
-
I just downloaded from Sourceforge.net the latest OpenCHAT (both OpenCHAT.jar, and OpenCHAT.src.zip), trying to implement them on some environments, but I found out that Worker.java file from (OpenCHAT.src.zip) is not in good shape. Then I tried to decompile Worker.class from OpenCHAT.jar, but even in this case, the resulting Worker.java file is not in good shape. In both of them , as an example the method httpFile() contains this corrupted sequence (handleClient method also is corrupted): boolean httpFile(String fileString, PrintStream ps) { File file; String fileName; String contentType; if(mimeTypes.isEmpty()) loadMimeTypes(); file = new File(fileString); fileName = file.getName(); String fileExt = fileName.lastIndexOf(".") >= 0 ? fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase() : ""; if(mimeTypes.containsKey(fileExt)) contentType = (String)mimeTypes.get(fileExt); else contentType = "text/plain"; byte buffer[] = new byte[2048]; FileInputStream in = new FileInputStream(file); boolean OK = printHeaders(ps, contentType + "\r\n\r\n"); int n; while((n = in.read(buffer)) > 0) ps.write(buffer, 0, n); break MISSING_BLOCK_LABEL_197; FileNotFoundException e; e; boolean flag; error = "File not found!"; flag = false; return flag; e; error = "Couldn't read from file!"; flag = false; return flag; Exception exception; exception; throw exception; OpenCHAT.p("SENT " + contentType + " " + fileName + " OK"); return true; } &&&&&&&&& Having said that can you please send a good Worker.java source code, please ?
-
Great !
-
very good
- Previous
- You're on page 1
- Next