Codota Logo
DataUtils.formatMessage
Code IndexAdd Codota to your IDE (free)

How to use
formatMessage
method
in
org.h2.mvstore.DataUtils

Best Java code snippets using org.h2.mvstore.DataUtils.formatMessage (Showing top 18 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.h2database/h2

/**
 * Create a new UnsupportedOperationException.
 *
 * @param message the message
 * @return the exception
 */
public static UnsupportedOperationException
    newUnsupportedOperationException(String message) {
  return new UnsupportedOperationException(formatMessage(0, message));
}
origin: com.h2database/h2

/**
 * Create a new IllegalStateException.
 *
 * @param errorCode the error code
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalStateException newIllegalStateException(
    int errorCode, String message, Object... arguments) {
  return initCause(new IllegalStateException(
      formatMessage(errorCode, message, arguments)),
      arguments);
}
origin: com.h2database/h2

/**
 * Create a new IllegalArgumentException.
 *
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalArgumentException newIllegalArgumentException(
    String message, Object... arguments) {
  return initCause(new IllegalArgumentException(
      formatMessage(0, message, arguments)),
      arguments);
}
origin: com.h2database/h2

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (len <= 0) {
    return 0;
  }
  while (true) {
    if (buffer == null) {
      try {
        buffer = nextBuffer();
      } catch (IllegalStateException e) {
        String msg = DataUtils.formatMessage(
            DataUtils.ERROR_BLOCK_NOT_FOUND,
            "Block not found in id {0}",
            Arrays.toString(idBuffer.array()));
        throw new IOException(msg, e);
      }
      if (buffer == null) {
        return -1;
      }
    }
    int result = buffer.read(b, off, len);
    if (result > 0) {
      pos += result;
      return result;
    }
    buffer = null;
  }
}
origin: org.wowtools/h2

/**
 * Create a new UnsupportedOperationException.
 *
 * @param message the message
 * @return the exception
 */
public static UnsupportedOperationException
    newUnsupportedOperationException(String message) {
  return new UnsupportedOperationException(formatMessage(0, message));
}
origin: org.wowtools/h2

/**
 * Create a new ConcurrentModificationException.
 *
 * @param message the message
 * @return the exception
 */
public static ConcurrentModificationException
    newConcurrentModificationException(String message) {
  return new ConcurrentModificationException(formatMessage(0, message));
}
origin: com.h2database/h2-mvstore

/**
 * Create a new UnsupportedOperationException.
 *
 * @param message the message
 * @return the exception
 */
public static UnsupportedOperationException
    newUnsupportedOperationException(String message) {
  return new UnsupportedOperationException(formatMessage(0, message));
}
origin: com.eventsourcing/h2

/**
 * Create a new ConcurrentModificationException.
 *
 * @param message the message
 * @return the exception
 */
public static ConcurrentModificationException
    newConcurrentModificationException(String message) {
  return new ConcurrentModificationException(formatMessage(0, message));
}
origin: com.eventsourcing/h2

/**
 * Create a new UnsupportedOperationException.
 *
 * @param message the message
 * @return the exception
 */
public static UnsupportedOperationException
    newUnsupportedOperationException(String message) {
  return new UnsupportedOperationException(formatMessage(0, message));
}
origin: com.h2database/h2-mvstore

/**
 * Create a new IllegalArgumentException.
 *
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalArgumentException newIllegalArgumentException(
    String message, Object... arguments) {
  return initCause(new IllegalArgumentException(
      formatMessage(0, message, arguments)),
      arguments);
}
origin: com.eventsourcing/h2

/**
 * Create a new IllegalArgumentException.
 *
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalArgumentException newIllegalArgumentException(
    String message, Object... arguments) {
  return initCause(new IllegalArgumentException(
      formatMessage(0, message, arguments)),
      arguments);
}
origin: com.h2database/h2-mvstore

/**
 * Create a new IllegalStateException.
 *
 * @param errorCode the error code
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalStateException newIllegalStateException(
    int errorCode, String message, Object... arguments) {
  return initCause(new IllegalStateException(
      formatMessage(errorCode, message, arguments)),
      arguments);
}
origin: com.eventsourcing/h2

/**
 * Create a new IllegalStateException.
 *
 * @param errorCode the error code
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalStateException newIllegalStateException(
    int errorCode, String message, Object... arguments) {
  return initCause(new IllegalStateException(
      formatMessage(errorCode, message, arguments)),
      arguments);
}
origin: org.wowtools/h2

/**
 * Create a new IllegalArgumentException.
 *
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalArgumentException newIllegalArgumentException(
    String message, Object... arguments) {
  return initCause(new IllegalArgumentException(
      formatMessage(0, message, arguments)),
      arguments);
}
origin: org.wowtools/h2

/**
 * Create a new IllegalStateException.
 *
 * @param errorCode the error code
 * @param message the message
 * @param arguments the arguments
 * @return the exception
 */
public static IllegalStateException newIllegalStateException(
    int errorCode, String message, Object... arguments) {
  return initCause(new IllegalStateException(
      formatMessage(errorCode, message, arguments)),
      arguments);
}
origin: com.eventsourcing/h2

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (len <= 0) {
    return 0;
  }
  while (true) {
    if (buffer == null) {
      try {
        buffer = nextBuffer();
      } catch (IllegalStateException e) {
        String msg = DataUtils.formatMessage(
            DataUtils.ERROR_BLOCK_NOT_FOUND,
            "Block not found in id {0}",
            Arrays.toString(idBuffer.array()));
        throw new IOException(msg, e);
      }
      if (buffer == null) {
        return -1;
      }
    }
    int result = buffer.read(b, off, len);
    if (result > 0) {
      pos += result;
      return result;
    }
    buffer = null;
  }
}
origin: org.wowtools/h2

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (len <= 0) {
    return 0;
  }
  while (true) {
    if (buffer == null) {
      try {
        buffer = nextBuffer();
      } catch (IllegalStateException e) {
        String msg = DataUtils.formatMessage(
            DataUtils.ERROR_BLOCK_NOT_FOUND,
            "Block not found in id {0}",
            Arrays.toString(idBuffer.array()));
        throw new IOException(msg, e);
      }
      if (buffer == null) {
        return -1;
      }
    }
    int result = buffer.read(b, off, len);
    if (result > 0) {
      pos += result;
      return result;
    }
    buffer = null;
  }
}
origin: com.h2database/h2-mvstore

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (len <= 0) {
    return 0;
  }
  while (true) {
    if (buffer == null) {
      try {
        buffer = nextBuffer();
      } catch (IllegalStateException e) {
        String msg = DataUtils.formatMessage(
            DataUtils.ERROR_BLOCK_NOT_FOUND,
            "Block not found in id {0}",
            Arrays.toString(idBuffer.array()));
        throw new IOException(msg, e);
      }
      if (buffer == null) {
        return -1;
      }
    }
    int result = buffer.read(b, off, len);
    if (result > 0) {
      pos += result;
      return result;
    }
    buffer = null;
  }
}
org.h2.mvstoreDataUtilsformatMessage

Javadoc

Format an error message.

Popular methods of DataUtils

  • readVarInt
    Read a variable size int.
  • appendMap
    Append a map to the string builder, sorted by key.
  • checkArgument
    Throw an IllegalArgumentException if the argument is invalid.
  • copyExcept
    Copy the elements of an array, and remove one element.
  • copyWithGap
    Copy the elements of an array, with a gap.
  • encodeLength
    Convert the length to a length code 0..31. 31 means more than 1 MB.
  • getCheckValue
    Calculate a check value for the given integer. A check value is mean to verify the data is consisten
  • getErrorCode
    Get the error code from an exception message.
  • getFletcher32
    Calculate the Fletcher32 checksum.
  • getPageChunkId
    Get the chunk id from the position.
  • getPageMaxLength
    Get the maximum length for the given code. For the code 31, PAGE_LARGE is returned.
  • getPageOffset
    Get the offset from the position.
  • getPageMaxLength,
  • getPageOffset,
  • getPagePos,
  • getPageType,
  • getVarIntLen,
  • initCause,
  • newIllegalArgumentException,
  • newIllegalStateException,
  • newUnsupportedOperationException

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • orElseThrow (Optional)
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now