Hi Malintha, Yes, this is what I exactly wanted. Thanks
Regards, Sohani Sohani Weerasinghe Software Engineer WSO2, Inc: http://wso2.com Mobile : +94 716439774 Blog :http://christinetechtips.blogspot.com/ Twitter : https://twitter.com/sohanichristine On Tue, Apr 22, 2014 at 9:15 PM, Malintha Adikari <[email protected]> wrote: > Hi Sohani, > > AFAIU you want something like this[1] > > Here we can use those constants as follows. Most of common types are > there. See the documentation. > > * System.out.println(javax.ws.rs.core.MediaType.APPLICATION_XML);* > > [1]http://docs.oracle.com/javaee/6/api/javax/ws/rs/core/MediaType.html > > Regards, > Malintha Adikari > > > On Tue, Apr 22, 2014 at 8:15 PM, Sohani Weerasinghe <[email protected]>wrote: > >> Hi All, >> >> If I want to use datatypes like "text/csv", "application/xml" etc. >> Instead of defining them as shown below, is there a way to use globally >> defined constants for those known data types? If so, can someone please >> state the way to use those constants? >> >> private final static String CSV_CONTENT_TYPE = "text/csv"; >> >> Thanks, >> Sohani >> >> Sohani Weerasinghe >> Software Engineer >> WSO2, Inc: http://wso2.com >> >> Mobile : +94 716439774 >> Blog :http://christinetechtips.blogspot.com/ >> Twitter : https://twitter.com/sohanichristine >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Malintha Adikari* > Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > Mobile: +94 71 2312958 > Blog: http://malinthas.blogspot.com > Page: http://about.me/malintha >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
