Documentation of 'org.apache.derby.iapi.util.UTF8Util' Java class
UTF8Util
org.apache.derby.iapi.util

Class UTF8Util



  • public final class UTF8Util
    extends java.lang.Object
    Utility methods for handling UTF-8 encoded byte streams.

    Note that when the skip methods mention detection of invalid UTF-8 encodings, it only checks the first byte of a character. For multibyte encodings, the second and third byte are not checked for correctness, just skipped and ignored.

    See Also:
    DataInput
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static long skipFully(java.io.InputStream in, long charsToSkip)
      Skip the requested number of characters from the stream.
      static long skipUntilEOF(java.io.InputStream in)
      Skip until the end-of-stream is reached.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • skipUntilEOF

        public static final long skipUntilEOF(java.io.InputStream in)
                                       throws java.io.IOException
        Skip until the end-of-stream is reached.
        Parameters:
        in - byte stream with UTF-8 encoded characters
        Returns:
        The number of characters skipped.
        Throws:
        java.io.IOException - if reading from the stream fails
        java.io.UTFDataFormatException - if an invalid UTF-8 encoding is detected
      • skipFully

        public static final long skipFully(java.io.InputStream in,
                                           long charsToSkip)
                                    throws java.io.EOFException,
                                           java.io.IOException
        Skip the requested number of characters from the stream.

        Parameters:
        in - byte stream with UTF-8 encoded characters
        charsToSkip - number of characters to skip
        Returns:
        The number of bytes skipped.
        Throws:
        java.io.EOFException - if end-of-stream is reached before the requested number of characters are skipped
        java.io.IOException - if reading from the stream fails
        java.io.UTFDataFormatException - if an invalid UTF-8 encoding is detected

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.