com.dyuproject.protostuff
Class NumberParser

java.lang.Object
  extended by com.dyuproject.protostuff.NumberParser

public final class NumberParser
extends java.lang.Object

An IO utility for dealing with raw ascii bytes.

Author:
David Yu
Date created:
Nov 19, 2010

Method Summary
static int parseInt(byte[] buffer, int start, int length, int radix)
          Parse an ascii int from a raw buffer.
static long parseLong(byte[] buffer, int start, int length, int radix)
          Parse an ascii long from a raw buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseInt

public static int parseInt(byte[] buffer,
                           int start,
                           int length,
                           int radix)
                    throws java.lang.NumberFormatException
Parse an ascii int from a raw buffer.

Throws:
java.lang.NumberFormatException

parseLong

public static long parseLong(byte[] buffer,
                             int start,
                             int length,
                             int radix)
                      throws java.lang.NumberFormatException
Parse an ascii long from a raw buffer.

Throws:
java.lang.NumberFormatException


Copyright © 2009-2013. All Rights Reserved.