wrapper class in java

by Geethalakshmi 2011-01-04 10:05:17

Wrapper Class in Java


The Wrapper class represents the base class for a set of data sources. This class provides library initialization services and access to the data source servers that the wrapper supports. The Wrapper class maintains the following information:

* The wrapper name.
* The wrapper core library name. The returned name is the name of the native library that loaded the wrapper.
* A WrapperInfo object that contains all of the information that pertains to this wrapper. This information gets stored in the federated server's system catalog as a result of issuing the DDL statements CREATE WRAPPER or ALTER WRAPPER.
* The FencedWrapper class and the UnfencedWrapper class are subclasses of the Wrapper class.

The Wrapper class is a wrapper class for the Java API.

Wrapper classes corresponding to respective simple data types are as given in table below.

Primitive Data Types

Wrapper class

byte - Byte

short - Short

int - Integer

long - Long

char - Character

float - Float

double - Double

boolean - Boolean

void - Void

This sample code shows the use of Character wrapper class:

public class IsDemo {

public static void main(String[] args) {

char a[] = {'a','b','5','?','A',' '};

for(int i=0;i<a.length;i++){

if(Character.isDigit(a[i]))
System.out.println(a[i] + "is a digit ");
if(Character.isLetter(a[i]))
System.out.println(a[i] + "is a letter ");
if(Character.isWhitespace(a[i]))
System.out.println(a[i] + "is a White Space ");
if(Character.isLowerCase(a[i]))
System.out.println(a[i] + "is a lower case ");
if(Character.isLowerCase(a[i]))
System.out.println(a[i] + "is a upper case ");
}

}
}

Tagged in:

1631
like
0
dislike
0
mail
flag

You must LOGIN to add comments