Java integration notes

What is scanner in java?

Search for: What is scanner in java?

reading csv files opencsv

Search for: reading csv files opencsv

An article on OpenCSV

alternatives to opencsv in java

Search for: alternatives to opencsv in java

Apache commons CSV open CSV

Search for: Apache commons CSV open CSV

Apache Commons CSV

Documentation

I am having migrating to JDK 9 and above

Here are some xpath docs

See if this helps from the nightmare of compiling for jdk 11 etc

Java util package (looking for base64 support)

Base64 support in java util (java12)


//previous
sun.misc.BASE64Decoder dec = new sun.misc.BASE64Decoder();
dec.decodeBuffer(userPassEncoded)

//New
import java.util.Base64
Base64.Decoder dec = Base64.getDecoder();
dec.decode(userPassEncoded)

finally block does not complete normally

Search for: finally block does not complete normally

I use oracle jdbc drivers for certain things. that was long time ago

Choosing right oracle jdbc driver based on JDK


//Previously
import org.apache.xpath.XPathAPI;
Node node = 
  XPathAPI.selectSingleNode(DOMUtils.getRootNode(dom),xpath);


//Now
import com.sun.org.apache.xpath.internal.XPathAPI;
Node node = 
   XPathAPI.selectSingleNode(DOMUtils.getRootNode(dom),xpath);

What are internal packages in java 9, java 11, java 12

Search for: What are internal packages in java 9, java 11, java 12


* Release 3.0 Build 46: Aug 8th, 2020
 * ***************************************
 * This became aspire_integration jar (for now)
 * Compiled with JDK 12
 * 
 * Not tested at run time
 * **********************
 * 1. XML config files
 * 2. XML output of web urls
 * 3. Only compiled. Nothing is tested yet
 * 
 * what is done
 * **********************
 * 1. upgraded oracle jar file ojdbc8.jar (good for jdk8, 9, 10 etc)
 * 2. Updated class names around oracle jar file
 * 3. Added jaxb support via jax-api-2.3.1.jar
 * 4. Removed xalan jars, and jaxp jars and went with defaults
 *
 * Changed files due to oracle drivers
 * ************************************
 * /db/StoredProcedureExecutor.java 
 * /db/StoredProcedureExecutor2.java 
 * /db/rel2/StoredProcedureExecutor3.java
 * 
 * Changes due to XML/xpath/xalan
 * *************************************
 * /extensions/dictionarycollectionpkg/XmlNodeDictionary.java 
 * /xml/DOMUtils.java
 * /xml/JDOMXMLOutPutter.java
 *
 *     XPathAPI to an internal package in java.xml
 *     From: org.apache.xpath.XPathAPI
 *     To: com.sun.org.apache.xpath.internal.XPathAPI
 * 
 * Changes due to Base64
 * *********************
 * /aspire/authentication/BaseAuthenticationMethod.java
 * /servlets/DefaultSessionSupport.java
 * /servlets/DefaultSessionSupport1.java
 * /servlets/DemuxServlet.java
 * /testservlets/SnoopAuthorization.java
 * 
 * (went to java.util.Base64)

working with apache CSV files: article

Understanding static and inner classes

get set access modifiers in java

Search for: get set access modifiers in java

My notes on json and gson

Multi line string in Java 11

Search for: Multi line string in Java 11

Not really easy it turns out. give up for now

reading env variables in java

Search for: reading env variables in java

Java system properties

Java environment variables: System.getenv()

API for getenv

So it is better to set them to all upper (or lower)

File.separator

Search for: File.separator

A good resource looks like for java overall

File.separator windows: \ unix: /

File.pathseparator windows: ; unix :

Working with Junit is here

boolean type in java

Search for: boolean type in java


boolean isJavaFun = true;
boolean isFishTasty = false;

java filter method generic collections

Search for: java filter method generic collections

Filtering a list in java

java regex matching groups

Search for: java regex matching groups

An article capturing javaregex groups

Oracle jdbc drivers are now start with ojdbc

Search for: Oracle jdbc drivers are now start with ojdbc

ojdbc11.jar

Here are my notes on public repos

Here is how you can browse in maven central

Notes on configuring jdbc driver for MS SQL Server are here

JDK 11 API

Search for: JDK 11 API

is there a default filenamefilter implementation in java

Search for: is there a default filenamefilter implementation in java

Apache Commons IO

Search for: Apache Commons IO

declaring a static generic method in java

Search for: declaring a static generic method in java

Basic types in java

Search for: Basic types in java

Oracle docs on basic java data types


public static <T> boolean isValidList(List<T> anyList)
   {
      if (anyList == null)
      {
         return false;
      }
      if (anyList.size() == 0)
      {
         return false;
      }
      return true;
   }

Listing files in a directory is here