Code example for CharBuffer

Methods: array

0
				else 
				{ 
					Charset charset = Charset.forName("UTF-8") ;
					ByteBuffer buf = ByteBuffer.wrap(cs.getBytes()) ;
					CharBuffer cbuf = charset.decode(buf) ;
					String cs2 = new String(cbuf.array()) ;
					cs2 = cs2.trim() ;
					return cs2;
				} 
			} 
			return cs ;
		} 
		return "" ; 
	} 
}