Tabnine Logo
BigIntParser.nextStringEndPos
Code IndexAdd Tabnine to your IDE (free)

How to use
nextStringEndPos
method
in
org.apache.flink.types.parser.BigIntParser

Best Java code snippets using org.apache.flink.types.parser.BigIntParser.nextStringEndPos (Showing top 3 results out of 315)

origin: apache/flink

@Override
public int parseField(byte[] bytes, int startPos, int limit, byte[] delimiter, BigInteger reusable) {
  final int endPos = nextStringEndPos(bytes, startPos, limit, delimiter);
  if (endPos < 0) {
    return -1;
  }
  if (endPos > startPos &&
      (Character.isWhitespace(bytes[startPos]) || Character.isWhitespace(bytes[(endPos - 1)]))) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_ILLEGAL_CHARACTER);
    return -1;
  }
  String str = new String(bytes, startPos, endPos - startPos, ConfigConstants.DEFAULT_CHARSET);
  try {
    this.result = new BigInteger(str);
    return (endPos == limit) ? limit : endPos + delimiter.length;
  } catch (NumberFormatException e) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_FORMAT_ERROR);
    return -1;
  }
}
origin: com.alibaba.blink/flink-core

@Override
public int parseField(byte[] bytes, int startPos, int limit, byte[] delimiter, BigInteger reusable) {
  final int endPos = nextStringEndPos(bytes, startPos, limit, delimiter);
  if (endPos < 0) {
    return -1;
  }
  if (endPos > startPos &&
      (Character.isWhitespace(bytes[startPos]) || Character.isWhitespace(bytes[(endPos - 1)]))) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_ILLEGAL_CHARACTER);
    return -1;
  }
  String str = new String(bytes, startPos, endPos - startPos, ConfigConstants.DEFAULT_CHARSET);
  try {
    this.result = new BigInteger(str);
    return (endPos == limit) ? limit : endPos + delimiter.length;
  } catch (NumberFormatException e) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_FORMAT_ERROR);
    return -1;
  }
}
origin: org.apache.flink/flink-core

@Override
public int parseField(byte[] bytes, int startPos, int limit, byte[] delimiter, BigInteger reusable) {
  final int endPos = nextStringEndPos(bytes, startPos, limit, delimiter);
  if (endPos < 0) {
    return -1;
  }
  if (endPos > startPos &&
      (Character.isWhitespace(bytes[startPos]) || Character.isWhitespace(bytes[(endPos - 1)]))) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_ILLEGAL_CHARACTER);
    return -1;
  }
  String str = new String(bytes, startPos, endPos - startPos, ConfigConstants.DEFAULT_CHARSET);
  try {
    this.result = new BigInteger(str);
    return (endPos == limit) ? limit : endPos + delimiter.length;
  } catch (NumberFormatException e) {
    setErrorState(ParseErrorState.NUMERIC_VALUE_FORMAT_ERROR);
    return -1;
  }
}
org.apache.flink.types.parserBigIntParsernextStringEndPos

Popular methods of BigIntParser

  • nextStringLength
  • parseField
  • setErrorState
  • <init>

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now