Documentation of 'org.neodatis.odb.core.layers.layer3.engine.IByteArrayConverter' Java class
IByteArrayConverter
org.neodatis.odb.core.layers.layer3.engine

Interface IByteArrayConverter

    • Method Detail

      • booleanToByteArray

        byte[] booleanToByteArray(boolean b)
      • byteArrayToBoolean

        boolean byteArrayToBoolean(byte[] bytes,
                                   int offset)
      • shortToByteArray

        byte[] shortToByteArray(short s)
      • byteArrayToShort

        short byteArrayToShort(byte[] bytes)
      • charToByteArray

        byte[] charToByteArray(char c)
      • byteArrayToChar

        char byteArrayToChar(byte[] bytes)
      • getNumberOfBytesOfAString

        int getNumberOfBytesOfAString(java.lang.String s,
                                      boolean useEncoding)
      • stringToByteArray

        byte[] stringToByteArray(java.lang.String s,
                                 boolean withSize,
                                 int totalSpace,
                                 boolean withEncoding)
        Parameters:
        s -
        withSize - if true, returns an array with an initial int with its size
        totalSpace - The total space of the string (can be bigger that the real string size - to support later in place update)
        withEncoding - To specify if SPECIFIC encoding must be used
        Returns:
        The byte array that represent the string
      • byteArrayToString

        java.lang.String byteArrayToString(byte[] bytes,
                                           boolean hasSize,
                                           boolean useEncoding)
        Parameters:
        bytes -
        hasSize - If hasSize is true, the first four bytes are the size of the string
        Returns:
        The String represented by the byte array
        Throws:
        java.io.UnsupportedEncodingException
      • bigDecimalToByteArray

        byte[] bigDecimalToByteArray(java.math.BigDecimal bigDecimal,
                                     boolean withSize)
      • byteArrayToBigDecimal

        java.math.BigDecimal byteArrayToBigDecimal(byte[] bytes,
                                                   boolean hasSize)
      • bigIntegerToByteArray

        byte[] bigIntegerToByteArray(java.math.BigInteger bigInteger,
                                     boolean withSize)
      • byteArrayToBigInteger

        java.math.BigInteger byteArrayToBigInteger(byte[] bytes,
                                                   boolean hasSize)
      • intToByteArray

        byte[] intToByteArray(int l)
      • intToByteArray

        void intToByteArray(int l,
                            byte[] arrayWhereToWrite,
                            int offset)
        This method writes the byte directly to the array parameter
      • byteArrayToInt

        int byteArrayToInt(byte[] bytes,
                           int offset)
      • longToByteArray

        byte[] longToByteArray(long l)
      • longToByteArray

        void longToByteArray(long l,
                             byte[] arrayWhereToWrite,
                             int offset)
        This method writes the byte directly to the array parameter
      • byteArrayToLong

        long byteArrayToLong(byte[] bytes,
                             int offset)
      • dateToByteArray

        byte[] dateToByteArray(java.util.Date date)
      • byteArrayToDate

        java.util.Date byteArrayToDate(byte[] bytes)
      • floatToByteArray

        byte[] floatToByteArray(float f)
      • byteArrayToFloat

        float byteArrayToFloat(byte[] bytes)
      • doubleToByteArray

        byte[] doubleToByteArray(double d)
      • byteArrayToDouble

        double byteArrayToDouble(byte[] bytes)
      • setDatabaseCharacterEncoding

        void setDatabaseCharacterEncoding(java.lang.String databaseCharacterEncoding)
      • booleanToByteArray

        void booleanToByteArray(boolean b,
                                byte[] arrayWhereToWrite,
                                int offset)
        Parameters:
        b -
        bytes -
        i -
      • testEncoding

        void testEncoding(java.lang.String encoding)
                   throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.