|
Code2Html Code To HTML Converter offers several prepackaged common HTML output syntax highlighting styles, such as Visual Studio Style, Eclipse Style, Monochrome Style, etc.
This Code2Html converter transforms the text you type into the standard HTML code every browser can recognize without altering the character encoding.
import ninja2.core.io_core.nbio.*;
import java.io.*;
import java.net.*;
public class NBIOServer
{
public static void main(String args[])
{
try
{
System.err.println("NBIO server starting...");
NonblockingServerSocket s = new NonblockingServerSocket(4046);
NonblockingSocket clisock = s.accept();
System.err.println("Got connection from " + clisock.getInetAddress()
.getHostName());
InputStream is = clisock.getInputStream();
byte barr[] = new byte[1024];
while (true)
{
int c = is.read(barr, 0, 1024);
if (c == - 1)
{
System.err.println("READ ERROR");
}
else if (c == 0)
{
System.err.println("READ NOTHING");
}
else
{
String str = new String(barr, 0, c);
System.err.println("READ: " + str);
}
}
}
catch (Exception e)
{
System.err.println("NBIOServer: Caught exception: " + e);
e.printStackTrace();
System.exit( - 1);
}
}
}
Code2Html Code To HTML converter is totally free for all, Download Code2Html Now!
|