List of usage examples for com.google.common.primitives UnsignedLong valueOf
public static UnsignedLong valueOf(String string)
From source file:com.wrmsr.wava.core.literal.I64Literal.java
public UnsignedLong u() { return UnsignedLong.valueOf(bits); }
From source file:com.tesora.dve.mysqlapi.repl.messages.MyRandLogEvent.java
@Override public void unmarshallMessage(ByteBuf cb) { seed1 = UnsignedLong.valueOf(cb.readLong()); seed2 = UnsignedLong.valueOf(cb.readLong()); }
From source file:c1c.v8fs.Attributes.java
private Date decodeDateTime(byte[] val) { byte[] arr = Arrays.copyOf(val, val.length); BigInteger divCn = new BigInteger("10"); //ArrayUtils.reverse(arr); Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(UnsignedLong.valueOf(new BigInteger(arr).divide(divCn)).longValue()); cal.add(cal.YEAR, -1969);//w w w .j a v a2s .c om return cal.getTime(); }
From source file:hsyndicate.fs.SyndicateLocalBlockCache.java
public UnsignedLong getBlockID(String filename) throws IOException { Matcher matcher = filenamePattern.matcher(filename); if (matcher.matches()) { String blockId = matcher.group(1); return UnsignedLong.valueOf(blockId); } else {/*w w w . j ava 2s . c o m*/ throw new IOException("Unable to parse BlockID from " + filename); } }
From source file:org.opennms.netmgt.sampler.storage.newts.NewtsSampleSetDispatcher.java
private UnsignedLong toUnsignedLong(SampleValue<?> value) { return UnsignedLong.valueOf(value.bigIntegerValue()); }
From source file:com.tesora.dve.mysqlapi.repl.messages.MyIntvarLogEvent.java
@Override public void unmarshallMessage(ByteBuf cb) { variableType = cb.readByte(); variableValue = UnsignedLong.valueOf(cb.readLong()); }
From source file:com.google.api.client.json.jackson.JacksonParser.java
@Override public UnsignedLong getUnsignedLongValue() throws IOException { return UnsignedLong.valueOf(parser.getBigIntegerValue()); }
From source file:com.google.api.client.extensions.android3.json.AndroidJsonParser.java
@Override public UnsignedLong getUnsignedLongValue() { checkNumber(); return UnsignedLong.valueOf(currentText); }
From source file:org.apache.nifi.processors.evtx.parser.BinaryReader.java
/** * Reads a timestamp that is the number of hundreds of nanoseconds since Jan 1 1601 * (see http://integriography.wordpress.com/2010/01/16/using-phython-to-parse-and-present-windows-64-bit-timestamps/) * * @return the date corresponding to the timestamp *//* ww w . j a v a2s.c om*/ public Date readFileTime() { UnsignedLong hundredsOfNanosecondsSinceJan11601 = readQWord(); long millisecondsSinceJan11601 = hundredsOfNanosecondsSinceJan11601.dividedBy(UnsignedLong.valueOf(10000)) .longValue(); long millisecondsSinceEpoch = millisecondsSinceJan11601 - EPOCH_OFFSET; return new Date(millisecondsSinceEpoch); }
From source file:org.sosy_lab.cpachecker.util.predicates.mathsat5.Mathsat5Model.java
private static Object interpreteFloatingPoint(String lTermRepresentation) { // the term is of the format "<VALUE>_<EXPWIDTH>_<MANTWIDTH>" Matcher matcher = FLOATING_POINT_PATTERN.matcher(lTermRepresentation); if (!matcher.matches()) { throw new NumberFormatException("Unknown floating-point format: " + lTermRepresentation); }// www. ja v a2 s. co m int expWidth = Integer.parseInt(matcher.group(2)); int mantWidth = Integer.parseInt(matcher.group(3)); if (expWidth == 11 && mantWidth == 52) { return Double.longBitsToDouble(UnsignedLong.valueOf(matcher.group(1)).longValue()); } else if (expWidth == 8 && mantWidth == 23) { return Float.intBitsToFloat(UnsignedInteger.valueOf(matcher.group(1)).intValue()); } // TODO to be fully correct, we would need to interpret this string return new BigInteger(matcher.group(1)); }