All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazon.redshift.core.CharOptimizedUTF8Encoder Maven / Gradle / Ivy

There is a newer version: 2.1.0.30
Show newest version
/*
 * Copyright (c) 2019, PostgreSQL Global Development Group
 * See the LICENSE file in the project root for more information.
 */

package com.amazon.redshift.core;

import java.io.IOException;

/**
 * UTF-8 encoder which validates input and is optimized for jdk 8 and lower where {@code String} objects are backed by
 * {@code char[]}.
 * @author Brett Okken
 */
final class CharOptimizedUTF8Encoder extends OptimizedUTF8Encoder {

  /**
   * {@inheritDoc}
   */
  @Override
  public String decode(byte[] encodedString, int offset, int length) throws IOException {
    return charDecode(encodedString, offset, length);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy