format proxy code, allow to change swf on the fly

This commit is contained in:
honfika@gmail.com
2014-09-01 16:56:55 +02:00
parent 8325d07b24
commit ed53ba9d0f
37 changed files with 1847 additions and 2267 deletions

View File

@@ -5,35 +5,29 @@ import java.io.OutputStream;
import java.io.IOException;
import java.net.SocketException;
class Copy implements Runnable
{
class Copy implements Runnable {
InputStream in = null;
OutputStream out = null;
Copy(InputStream in, OutputStream out)
{
this.in = in;
this.out = out;
Copy(InputStream in, OutputStream out) {
this.in = in;
this.out = out;
}
public void run()
{
int n;
byte[] buffer = new byte[8192];
public void run() {
int n;
byte[] buffer = new byte[8192];
try
{
while ((n = in.read(buffer, 0, buffer.length)) > 0)
{
out.write(buffer, 0, n);
out.flush();
}
out.flush();
}catch(SocketException e){
}
catch (IOException e)
{
//Ignore errors
}
try {
while ((n = in.read(buffer, 0, buffer.length)) > 0) {
out.write(buffer, 0, n);
out.flush();
}
out.flush();
} catch (SocketException e) {
} catch (IOException e) {
//Ignore errors
}
}
}