1 24 25 package org.objectweb.cjdbc.common.sql.filters; 26 27 import org.objectweb.cjdbc.common.stream.encoding.HexaEncoding; 28 import org.objectweb.cjdbc.common.xml.DatabasesXmlTags; 29 30 37 public class HexaBlobFilter extends AbstractBlobFilter 38 { 39 40 43 public byte[] decode(byte[] data) 44 { 45 return HexaEncoding.hex2data(new String (data)); 46 } 47 48 51 public String encode(String data) 52 { 53 return encode(data.getBytes()); 54 } 55 56 59 public byte[] decode(String data) 60 { 61 return HexaEncoding.hex2data(data); 62 } 63 64 67 public String encode(byte[] data) 68 { 69 return HexaEncoding.data2hex(data); 70 } 71 72 75 public String getXml() 76 { 77 return DatabasesXmlTags.VAL_hexa; 78 } 79 80 } | Popular Tags |