This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.common.util.concurrent.*; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.CountDownLatch; | |
| import java.util.concurrent.Executors; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.util.Date; | |
| public class UnbufferedClient { | |
| public static void main(String[] args) throws Exception { | |
| URL u = new URL("http://localhost:8080/testapp/AsyncServlet"); | |
| InputStreamReader r = new InputStreamReader(u.openConnection().getInputStream()); | |
| char [] buf = new char[1024]; | |
| int n; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test.servlet; | |
| import java.io.IOException; | |
| import javax.servlet.AsyncContext; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.annotation.WebServlet; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Swap{ | |
| public static void main( String[] args ) { | |
| /*int a = 5; | |
| int b = 10;*/ | |
| CheckPrimitive cp = new CheckPrimitive(); | |
| int a = 5; | |
| int b = 10; | |
| System.out.println( "a first value:" + a ); | |
| System.out.println( "b first value:" + b ); |
NewerOlder