See this topic is not most people are dismissive, indeed almost every Java program ape has written the JSON tool class, and many people have used json-lib.jar encapsulation of similar functions, but I use the regular to support the XML and JSON, reduce the introduction of the jar package. Basically meet the needs. Of course, if you need more powerful features, it's best to use json-lib to achieve it.
Take a
Java Utility ClassThe 1.File class provides methods for managing files and directories whose objects represent a file or directory. It provides several ways to manipulate a file or folder. The list () method and the Listfiles () method can play a role in locating a specific file.The 2.Object class, which is the ancesto
(Reproduced: http://www.hollischuang.com/archives/1606)GitHub Address: Https://github.com/liufeiSAP/javaStudy.gitIn Java, there are a number of more useful class libraries, and they usually define a series of methods with common functionality. This article summarizes the most common Java utility classes and their most
= =).toLowerCase (): Converts a string to lowercase characters.toUpperCase (): Converts a string to uppercase characters.Equalsignorecase (): Compares whether two strings are the same (case insensitive).4) StringBuilder and StringBuffer classYou need to use StringBuilder or stringbuffer when you need to do frequent concatenation of strings.5) Date class and SimpleDateFormat classThe date class is used to m
Org.apache.commons.lang.StringUtilsAs a supplement to the Lang package in the JDKCheck if charsequence is empty, null, or blank spaceCharsequence (Charbuffer, Segment, String, StringBuffer, StringBuilder)
IsBlank (charsequence) can check for null, NULL, and space
IsEmpty (charsequence) can only check for null and NULL
There are also Isnotblank (CS) and Isnotempt (CS)
String interceptionSubstring/left/right/mid-null-safe Substring ExtractionsString completionLeftpad/rightpad/center/
;" +integer.tooctalstring (10));SYSTEM.OUT.PRINTLN ("16 binary 10 corresponding data----->" +integer.tohexstring (10));}/*** 5.valueOf* Convert basic data types to corresponding packaging----> boxing* Xxxvalue 8 package types are available.* Convert XXX type to corresponding basic data type---> Unboxing */@Testpublic void Test05 () {int num=3;Integer i=integer.valueof (num);Num=i.intvalue ();}/*** 6. Classic Face Test* because integer.valueof (num) caches data between -128~127* If our data is in
JAVA utility -- javamail and utility -- javamail
Before implementing javamail, you must first set up an email server.James needs to use the Tomcat server when developing WEB programs, but the Tomcat server does not support Mail processing. Therefore, to send emails, you need to configure a separate Java Mail server, ja
C # log class, utility. NET Log Action class
System logs are frequently used by both Web applications and Windows Forms applications. Log can help us to track the operation of the monitoring system, timely detection of errors, output mode information. There are many ways to log logs, such as using text files, XML files, databases, and so on. Logging with a text
Nestedgridview
Nested GridView Used
Nestedlistview
Nested use of ListView
Osutils
Android System Toolbox
Otherutils
The main is to add HTML to the string
Reflectutils
Reflection Tool class that provides some basic Java reflection functionality
Regexutils
Regular Expression tool
to the frequency of word occurrence descending sort!2, in descending order by the frequency of letters!The Squid project provides a number of resources toassist users design,implement and support squid installations. Browsethe documentation and support sections for more infomation#!/bin/shword= "thesquidprojectprovidesanumberofresources Toassistusersdesign,implementandsupportsquidinstallations.please browsethedocumentationandsupportsectionsformoreinfomation "#A = ' echo $word |egrep-o ' [a-za-z
When using. Net to develop certain arcgisengine interfaces for parameter passing, some interfaces defined earlier in MS [ifontdisp, ipicturedisp] are sometimes used.These interfaces have been replaced by new types in. net. How can we perform type conversion? A static object is provided in the engine. Net API to facilitate this common type conversion?Process descriptionA static OLE object is provided in the ESRI. ArcGIS. Utility. comsupport package of
In the Java.util package, there is a utility class for manipulating arrays: Java.util.Arrays. It provides a series of static methods. See Javaapi for details. Packagepackage14_7;Importjava.util.Arrays; Public classarray_2 { Public Static voidTeststringarray () {string[] S1={"Tom", "Jack", "Mike", "Tom2"}; string[] S2={"Tom", "Jack", "Mike", "Tom2"}; System.out.println ("S1 and s2 comparison" +arrays.equals
The Guard class in the Utility folder is a help class that is only visible in the ObjectBuilder project and mainly performs verification.
1 using System;
2 using System. Collections. Generic;
3 using System. Text;
4 using System. Globalization;
5 using System. Reflection;
6 using Microsoft. Practices. ObjectBuilder. Properties;
7
8 namespace Microsoft. Practices.
Class wawa_str 'create a class named Wawa'*************************************** ******************'Objective: String utility function. Each method is annotated accordingly. I didn't use a regular expression to determine whether'Search the boundary of a string, just write a function. If you want to judge the boundary, use/B,'The political expression of vbs is no
the console serializer. Serialize (Console.Out, CC); Console.read (); }} [XmlRoot ("Cats")] public class Catcollection {[XmlArray ("Items"), XmlArrayItem ("item")] Pub Lic cat[] Cats {get; set;} } [XmlrooT ("Cat")] public class Cat {//defines the attribute serialized as a cat node property [XmlAttribute ("color")] public string Col or {get; set;} Requires no serializat
Source program. ^Using System;
Using System. Text;
Using System. Runtime. InteropServices;
Using System. Security. Cryptography;
Using System. IO;
Namespace Utility
{
/** //
/// The DSAPI wrapper
/// Security encryption algorithm for future extension
/// To be released as part of the Microsoft Configuration Building Block
///
Public class DataProtector
{
// Private parameter ricalgorithm mCSP
Scene:1. Windows software development always need to format time, get the software's copyright time, get temporary directory, get download directory and AppData directory, these methods parts if not search MSDN really hard to find.2. Can be ported across products.#ifndef __bas_utility_sys_h#define__bas_utility_sys_h#include "Bas_exp.h" #include Windows utility Tools Class-
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.