/** * Compose. * * @param value * the value * @param clazz * the clazz * @return the byte[] */ private static byte[] compose(Object value, Class clazz) { return IntegerType.instance.decompose((BigInteger) value).array(); }
private static byte[] compose(Object value, Class clazz) { return IntegerType.instance.decompose((BigInteger) value).array(); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; BigInteger integerType; try { integerType = new BigInteger(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(integerType); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; BigInteger integerType; try { integerType = new BigInteger(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(integerType); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; BigInteger integerType; try { integerType = new BigInteger(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(integerType); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; BigInteger integerType; try { integerType = new BigInteger(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(integerType); }
public ByteBuffer fromString(String source) throws MarshalException { // Return an empty ByteBuffer for an empty string. if (source.isEmpty()) return ByteBufferUtil.EMPTY_BYTE_BUFFER; BigInteger integerType; try { integerType = new BigInteger(source); } catch (Exception e) { throw new MarshalException(String.format("unable to make int from '%s'", source), e); } return decompose(integerType); }