Java 类org.bson.BSONDecoder 实例源码

项目:if26_projet    文件:ServletUtils.java   
/**
 * decrypt a BSON string
 * @param datas : BSON formated String
 * @return JSON formated String
 */
private static String decryptBSON(String datas){
    String[] tab = datas.split("[a-zA-Z]");
       byte[] array = new byte[tab.length];
       for(int i =0; i<tab.length; i++){
           array[i] = Byte.valueOf(tab[i]);
       }
       BSONDecoder decoder = new BasicBSONDecoder();
       BasicBSONObject obj = (BasicBSONObject) decoder.readObject(array);
       System.out.println(obj);
       return obj.toString();
}
项目:usergrid    文件:BSONUtils.java   
public static BSONDecoder decoder() {
    return _staticDecoder.get();
}
项目:usergrid    文件:BSONUtils.java   
@Override
protected BSONDecoder initialValue() {
    return new BasicBSONDecoder();
}