HttpClient(4.3.5) - HTTP Protocol Interceptors
摘要:The HTTP protocol interceptor is a routine that implements a specific aspect of the HTTP protocol. Usually protocol interceptors are expected to act u
阅读全文
posted @
2016-07-30 16:52
huey2672
阅读(412)
推荐(0)
HttpClient(4.3.5) - HTTP Execution Context
摘要:Originally HTTP has been designed as a stateless, response-request oriented protocol. However, real world applications often need to be able to persis
阅读全文
posted @
2016-07-30 15:49
huey2672
阅读(358)
推荐(0)
HttpClient(4.3.5) - HTTP Header
摘要:An HTTP message can contain a number of headers describing properties of the message such as the content length, content type and so on. HttpClient pr
阅读全文
posted @
2016-07-30 12:10
huey2672
阅读(697)
推荐(0)
HttpClient(4.3.5) - HTTP Request & HTTP Response
摘要:HTTP Request All HTTP requests have a request line consisting a method name, a request URI and an HTTP protocol version. HttpClient supports out of th
阅读全文
posted @
2016-07-30 11:58
huey2672
阅读(359)
推荐(0)
Features for configuring JSON-to-Java mapping
摘要:Following on/off features are defined in DeserializationConfig.Feature (Jackson 1.x) or DeserializationFeature (Jackson 2.x): ACCEPT_EMPTY_STRING_AS_N
阅读全文
posted @
2016-06-29 15:18
huey2672
阅读(362)
推荐(0)
Jackson - Features for configuring Java-to-JSON mapping
摘要:Following on/off features are defined in SerializationConfig.Feature (for Jackson 1.x), or SerializationFeature (Jackson 2.x): AUTO_DETECT_FIELDS (def
阅读全文
posted @
2016-06-29 14:49
huey2672
阅读(740)
推荐(0)
Commons Math - Primes
摘要:org.apache.commons.math3.primes.Primes 是关于质数操作的工具类。 1. public static boolean isPrime(int n) 判断 n 是否为质数。 2. public static int nextPrime(int n) 返回大于 n 的
阅读全文
posted @
2016-06-22 10:38
huey2672
阅读(289)
推荐(0)
Exchanger, Changing data between concurrent tasks
摘要:The Java concurrency API provides a synchronization utility that allows the interchange of data between two concurrent tasks. In more detail, the Exch
阅读全文
posted @
2016-06-02 18:42
huey2672
阅读(190)
推荐(0)
Java Concurrency - Phaser, Controlling phase change in concurrent phased tasks
摘要:The Phaser class provides a method that is executed each time the phaser changes the phase. It's the onAdvance() method. It receives two parameters: t
阅读全文
posted @
2016-06-02 17:12
huey2672
阅读(288)
推荐(0)
Java Concurrency - 浅析 Phaser 的用法
摘要:One of the most complex and powerful functionalities offered by the Java concurrency API is the ability to execute concurrent-phased tasks using the P
阅读全文
posted @
2016-06-02 15:55
huey2672
阅读(460)
推荐(0)
Java Concurrency - 浅析 CyclicBarrier 的用法
摘要:The Java concurrency API provides a synchronizing utility that allows the synchronization of two or more threads in a determined point. It's the Cycli
阅读全文
posted @
2016-06-02 13:26
huey2672
阅读(362)
推荐(0)
Java Concurrency - 浅析 CountDownLatch 的用法
摘要:The Java concurrency API provides a class that allows one or more threads to wait until a set of operations are made. It's the CountDownLatch class. T
阅读全文
posted @
2016-06-01 21:28
huey2672
阅读(262)
推荐(0)
Java - 正则表达式常用操作
摘要:验证 简单验证 提取 替换 简单替换 使用 Pattern 对象,方便反复使用 切分 简单切分 使用 Pattern 对象,方便反复使用
阅读全文
posted @
2016-05-26 14:46
huey2672
阅读(267)
推荐(0)
Jackson - Date Handling
摘要:Handling dates on Java platform is complex business. Jackson tries not to make it any harder than it has to be. Here's how. All time objects that have
阅读全文
posted @
2016-05-23 13:41
huey2672
阅读(648)
推荐(0)
Jackson - Quickstart
摘要:JSON Three Ways Jackson offers three alternative methods (one with two variants) for processing JSON: Streaming API (aka "Incremental parsing/generati
阅读全文
posted @
2016-05-23 12:16
huey2672
阅读(353)
推荐(0)
SAX - Hello World
摘要:SAX 是一种事件驱动的 XML 数据处理模型。对于 DOM 模型,解析 XML 文档时,需要将所有内容载入内容。相比 DOM 模型,SAX 模型更为高效,它一边扫描一边解析 XML 文档。但与 DOM 模型相比,SAX 的操作更为复杂。 简单示例:
阅读全文
posted @
2016-05-21 17:12
huey2672
阅读(277)
推荐(0)
JDK Tools - wsimport: 编译 WSDL 生成 JAX-WS 规范的 Java 类
摘要:wsimport 命令是用来编译 wsdl 生成JAX-WS 规范的 Java 类的工具。 命令格式 wsimport [ options ] wsdl 命令参数 -s directory 指定源文件所在的目录。 -d directory 在指定的目录生成 Java 类。 -p name 指定生成的
阅读全文
posted @
2016-05-20 16:55
huey2672
阅读(351)
推荐(0)
JAXB - Annotations, Type Mapping: XmlSchemaType
摘要:The annotation XmlSchemaType defines a mapping between an arbitrary Java type and a simple schema built-in type. Most of the time the default mapping
阅读全文
posted @
2016-05-20 15:54
huey2672
阅读(370)
推荐(0)
JAXB - Annotations, Type Adapters: XmlJavaTypeAdapter
摘要:For some Java container types JAXB has no built-in mapping to an XML structure. Also, you may want to represent Java types in a way that is entirely d
阅读全文
posted @
2016-05-20 15:48
huey2672
阅读(348)
推荐(0)
JAXB - Annotations, Annotations for Enums: XmlEnum, XmlEnumValue
摘要:An enum type is annotated with XmlEnum. It has an optional element value of type java.lang.Class which defines the class used for the values used in t
阅读全文
posted @
2016-05-20 15:35
huey2672
阅读(367)
推荐(0)