Page Path | Title |
/java/applet/webstart |
java webstart example |
/java/awt/draw |
draw shape and text on canvas |
/java/awt/draw_save |
draw text and shape on canvas and save as image |
/java/awt/generate_image |
generate image from a console application |
/java/awt/hello |
a hello world awt application example |
/java/bytecode/asm/Hello |
generate a simple Hello World class file |
/java/bytecode/asm/array |
array operation |
/java/bytecode/asm/array_put |
create an array of object and set item value |
/java/bytecode/asm/copy_class |
read class file and write out into another file |
/java/bytecode/asm/field |
get and set field value |
/java/bytecode/asm/invoke |
invoke method and instantiate class |
/java/bytecode/asm/methodvisitor |
generate instruction with methodvisitor |
/java/bytecode/asm/object_init |
object construction and initialization |
/java/bytecode/asm/printlocal |
print local variable |
/java/bytecode/asm/printstack |
print the values on the operand stack |
/java/bytecode/asm/tree_transform |
ASM tree api-read class file, transform, then write the changed class file |
/java/bytecode/instruction/stack |
stack instructions |
/java/bytecode/instructions |
jvm bytecode instruction set |
/java/bytecode/instrument |
run-time bytecode instrumentation |
/java/collection/list/iterator |
separate two iterator from a single list |
/java/collection/list/reverse_iterator |
reverse iteration through a list |
/java/collection/map/iteration |
Iteration each key value through a Java Map |
/java/collection/sort/map |
sort key set of map according its values |
/java/collection/sort/string-array |
sort array of string, reverse order using Comparator |
/java/collection/sort/string-list |
simple sorting of list of string, ascending or descending |
/java/convert/int2hex |
convert integer to hex string |
/java/cryptography/digest/hmac-sha1 |
calculate the message signature based on secret key |
/java/database/jdbc/batch_call |
call multiple store procedures in one transitional execution |
/java/database/jdbc/batch_update |
update a batch of sql statement (insert, update and delete) in one jdbc request |
/java/database/jdbc/delete |
delete rows with jdbc |
/java/database/jdbc/hello_teradata |
a hello world example to connect teradata through jdbc |
/java/database/jdbc/teradata_datasource |
set up teradata jdbc PoolDataSource |
/java/database/jdbc/teradata_minipool |
use MiniConnectionPoolManager to manage teradata jdbc connection pool |
/java/database/sql/combine_small_queries |
combine multiple small queries into one single query |
/java/date/display |
toString, display format |
/java/date/iterate_date |
loop through each date of a year |
/java/doclet/extract |
use doclet to extract class, field, method information from java source code |
/java/doclet/hello |
a simple example to use custom doclet to extract information from java source code |
/java/file/currentdir |
set the current working directory |
/java/file/extension |
get file extension from file path, relative or absolute |
/java/file/traverse |
recursively traverse a directory tree and list all files |
/java/generics/class/simple |
java class generic simple example |
/java/generics/method/newInstance |
typed newInstance - construct a strong type object from a class |
/java/howto/unicode-escape |
convert native non-ascii characters to unicode escape, can be used in java properties file |
/java/io/bionary/byte |
read and write byte |
/java/io/flush |
a very simple servlet file logger -flush Filewriter so all output can be seen after that |
/java/io/input_to_output |
copy inputstream to outputstream |
/java/io/properties |
|
/java/io/properties/stream |
load properties from classpath |
/java/io/read-file-from-classpath |
read file from java classpath |
/java/io/read-text |
read text file |
/java/io/stream2byte |
InputStream to byte array |
/java/io/summary |
usage of Java io |
/java/jflex/simple/standalone |
define variables and expand its variables |
/java/jflex/strip_comments |
remove comments from java source code |
/java/jflex/tokens |
tokenizing |
/java/jsp/custom/forward |
|
/java/jsp/custom/getProperty |
|
/java/jsp/custom/hello |
jsp custom tag implementation |
/java/jsp/custom/include |
|
/java/jsp/custom/useBean |
jsp custom example, useBean |
/java/net/proxy |
|
/java/net/url/relative2absolute |
get the absolute url from relative url, relative to the base url |
/java/reflection/array_dimesion |
find out dimesion of array object |
/java/reflection/invoke/method-with-arguments |
invoke a method that take arguments and return a value |
/java/reflection/invoke/method-with-object-arguments |
invoke method that take regular object as argument |
/java/reflection/invoke/simple-instance |
invoke a simple instance method dynamically |
/java/reflection/invoke/static-method |
invoke static method dynamically with reflection |
/java/reflection/modifiers |
modifier of class fields and methods |
/java/regex/alternative_patterns |
match one of several alternative patterns |
/java/regex/eachline_match |
match again the begining of each line |
/java/regex/match_multiple_instances |
match all occurences of pattern |
/java/regex/match_replace |
match a pattern in multiplace locations and get replaced through a callback function |
/java/serialization/all_fields |
get values of all fields of an object and its superclass and up |
/java/serialization/array |
read array elements |
/java/serialization/fields |
|
/java/serialization/private |
access private field |
/java/serialization/xml/dump |
dump java bean object to an xml file |
/java/serlvet/raw_post |
a servlet that receive raw post data and save to a file |
/java/servlet/context_listener |
web application initialization using ServletContextListener |
/java/servlet/forward |
internal forward -handle a request by multiple servlets |
/java/servlet/redirect |
redirect to external url through location header |
/java/servlet/tomcat_mapping |
tomcat servlet url mapping in web.xml |
/java/servlet/tomcat_mapping_path_extension |
servlet url patterson -- path prefix match take precedance over extension math |
/java/string/escape |
escape special characters in java string |
/java/string/escape_xml |
escape special character in xml to produce a well-format xml |
/java/string/printf |
c-like printf in java |
/java/string/replace |
convert one string to another with regex pattern |
/java/string/split |
split a string into array of word |
/java/string/trim-ending-characters |
remove some ending character from string |
/java/syntax/class/init_sequence |
java object initialization sequence |
/java/syntax/class/localinner |
local inner class or local anonymous class |
/java/syntax/class/nested |
static or non-static nested class |
/java/syntax/class/object_id |
get java object id -- heuristically unique |
/java/syntax/switch |
switch statement fall through |
/java/syntax/vararg |
a function that take variable number of argument |
/java/textformat/csv/reader |
read excel style cvs file |
/java/textformat/csv/writer |
write data into excel style csv file |
/java/thread/arrayblockingqueuetest |
a blocking queue that block when try to put an object beyond the queue's capacity |
/java/thread/atomiccounter |
counter read/write by multiple threads |
/java/thread/collection/copyonwritearraylist1test |
a simple example to demonstrator the issue of current modification of the iterator of a simple regular list |
/java/thread/collection/copyonwritearraylist2test |
use CopyOnWriteArrayList to do current modification of a list iterator by multiple threads |
/java/thread/countdownlatch1test |
CountDownLatch await block till enough countDown called |
/java/thread/countdownlatchtest |
map-reduce tasks using CountDownLatch |
/java/thread/counter |
generate a unique id in JVM instance using AtomicLong |
/java/thread/cyclicbarrier2test |
a simple example to use CyclicBarrier |
/java/thread/cyclicbarrier_await |
basic method to use CyclicBarrier - await |
/java/thread/deadlock |
a simple example with a potential dead |
/java/thread/executiveservice |
use a thread pool implemented with ExecutiveService |
/java/thread/executortest |
create thread and run task using Executor interface |
/java/thread/futuretask |
use FutureTask to run a task in a new thread, and return results and capture exception |
/java/thread/interrupt |
send and handle interrupt signal among threads |
/java/thread/interrupted |
Thread.interrupted() clear the interrupted flag |
/java/thread/join |
join ask all children threads to finish their jobs and join the current thread |
/java/thread/queue/exchanger1test |
exechange data between two threads by a blocking handshake |
/java/thread/queue/provider_consumer |
provider send jobs through blocking queue - shutdown the queue gracefully through poison objects |
/java/thread/queue/synchronousqueue3test |
a simple example of coordination between the provider and the sonsumer |
/java/thread/queue/synchronousqueue_blocking |
basic syntax of using SynchronousQueue -blocking take and put methods |
/java/thread/reentrant |
the same thread can grap the lock that was holded by the same thread |
/java/thread/runnableimp |
create a thread java class by implements Runnable interface |
/java/thread/scheduledexecutorservice_delay |
delay execution of task in separate thread |
/java/thread/scheduledexecutorservice_periodic |
schedule a task to run periodically through a thread pool |
/java/thread/semaphoretest |
a simple semaphore example of using its aquire and release methods - exclusively use a resource |
/java/thread/sharedvalue |
a simple example to demonstrate the issue of shared value that is modified by multiple thread |
/java/thread/sharedvalue_usethreadlocal |
a simple example to use ThreadLocal to have its own copy of shared variable in the thread |
/java/thread/sleep |
suspect the current thread execution without consume cpu |
/java/thread/static |
static field, each thread has its own value |
/java/thread/staticthread |
lock on static class method |
/java/thread/synchronizedmethod |
synchronize on an instance method |
/java/thread/synchronizedmethod2 |
synchronize two instance methods |
/java/thread/synchronizedstatement |
synchronize a block of statement |
/java/thread/threadext |
create a thread class by extend Thead, and run thead by calling start method |
/java/thread/threadlocal |
shared threadlocal variable |
/java/thread/unsynchronizedmethod |
a simple example to demonstrate the issue when multiple threads write using unsynchronized method |
/java/thread/volatilelong |
declare a variable volatile to provide an immediate available memory model |
/java/thread/volatilesingleton |
using volatile when creating a Singleton class |
/java/urlconnection/proxy2outside |
download a page inside a corporate network through proxy |
/java/urlconnection/response-headers |
get http response headers |
/java/urlconnection/simple-get |
download html from a web link |
/java/web/jstl/choose |
|
/java/web/jstl/collection-loop |
data type used for loop in jstl |
/java/web/jstl/fixed-loop |
JavaServer Page Standard Library - simple iteration |
/java/web/jstl/if |
|
/java/web/jstl/jsp_el |
|
/java/web/jstl/list_of_list |
use list of list in nested forEach loop |
/java/web/jstl/list_of_object |
use list of object in forEach loop construction |
/java/web/jstl/variable |
|
/java/xml/dom/simple |
parse xml into dom |
/java/xml/dom/write |
write java data to xml string using dom api |
/java/xml/dom_creation |
create xml document by using dom api |
/java/xml/dom_schemavalidator |
parse xml using DOM api validated by xml schema |
/java/xml/domreader |
parse xml with dom api |
/java/xml/jaxb/hello |
jaxb map schema to java class |
/java/xml/jaxb/manual |
annotate java class manually to map between xml and object |
/java/xml/sax |
parse xml stream using JAXP SAX api |
/java/xml/sax/simple |
parse xml document with sax api |
/java/xml/xpath-program |
a simple java program that test xpath |
/java/xml/xslt-program |
|
/java/xml/xsltransform |
xslt transformation using jdk SAXP api |
/java/xml/xsltransform_precompile |
xsl transformation with precompiled stylesheet |