org.neodatis.odb.core.layers.layer3.engine
Interface IByteArrayConverter
-
- All Superinterfaces:
- ITwoPhaseInit
- All Known Implementing Classes:
- DefaultByteArrayConverter
public interface IByteArrayConverter extends ITwoPhaseInit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description byte[]bigDecimalToByteArray(java.math.BigDecimal bigDecimal, boolean withSize)byte[]bigIntegerToByteArray(java.math.BigInteger bigInteger, boolean withSize)byte[]booleanToByteArray(boolean b)voidbooleanToByteArray(boolean b, byte[] arrayWhereToWrite, int offset)java.math.BigDecimalbyteArrayToBigDecimal(byte[] bytes, boolean hasSize)java.math.BigIntegerbyteArrayToBigInteger(byte[] bytes, boolean hasSize)booleanbyteArrayToBoolean(byte[] bytes, int offset)charbyteArrayToChar(byte[] bytes)java.util.DatebyteArrayToDate(byte[] bytes)doublebyteArrayToDouble(byte[] bytes)floatbyteArrayToFloat(byte[] bytes)intbyteArrayToInt(byte[] bytes, int offset)longbyteArrayToLong(byte[] bytes, int offset)shortbyteArrayToShort(byte[] bytes)java.lang.StringbyteArrayToString(byte[] bytes, boolean hasSize, boolean useEncoding)byte[]charToByteArray(char c)byte[]dateToByteArray(java.util.Date date)byte[]doubleToByteArray(double d)byte[]floatToByteArray(float f)intgetNumberOfBytesOfAString(java.lang.String s, boolean useEncoding)byte[]intToByteArray(int l)voidintToByteArray(int l, byte[] arrayWhereToWrite, int offset)This method writes the byte directly to the array parameterbyte[]longToByteArray(long l)voidlongToByteArray(long l, byte[] arrayWhereToWrite, int offset)This method writes the byte directly to the array parametervoidsetDatabaseCharacterEncoding(java.lang.String databaseCharacterEncoding)byte[]shortToByteArray(short s)byte[]stringToByteArray(java.lang.String s, boolean withSize, int totalSpace, boolean withEncoding)voidtestEncoding(java.lang.String encoding)-
Methods inherited from interface org.neodatis.odb.core.ITwoPhaseInit
init2
-
-
-
-
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 sizetotalSpace- 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