Java org.apache.hadoop.io Text fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.io Text fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.io Text.

The text is from its open source code.

Subclass

org.apache.hadoop.io.Text has subclasses.
Click this link to see all its subclasses.

Constructor

Text()
Text(String string)
Construct from a string.
Text(Text utf8)
Construct from another text.
Text(byte[] utf8)
Construct from a byte array.

Method

voidappend(byte[] utf8, int start, int len)
Append a range of bytes to the end of the given text
intbytesToCodePoint(ByteBuffer bytes)
Returns the next code point at the current position in the buffer.
intcharAt(int position)
Returns the Unicode Scalar Value (32-bit integer value) for the character at position.
voidclear()
Clear the string to empty.
intcompareTo(BinaryComparable other)
Compare bytes from {#getBytes()}.
intcompareTo(byte[] other, int off, int len)
Compare bytes from {#getBytes()} to those provided.
byte[]copyBytes()
Get a copy of the bytes that is exactly the length of the data.
Stringdecode(byte[] utf8, int start, int length)
Stringdecode(byte[] utf8)
Converts the provided byte array to a String using the UTF-8 encoding.
ByteBufferencode(String string)
Converts the provided String to bytes using the UTF-8 encoding.
ByteBufferencode(String string, boolean replace)
Converts the provided String to bytes using the UTF-8 encoding.
booleanequals(Object o)
Returns true iff o is a Text with the same contents.
intfind(String what, int start)
Finds any occurrence of what in the backing buffer, starting as position start.
intfind(String what)
byte[]getBytes()
Returns the raw bytes; however, only data up to #getLength() is valid.
intgetLength()
Returns the number of bytes in the byte array
inthashCode()
voidreadFields(DataInput in)
deserialize
StringreadString(DataInput in)
Read a UTF8 encoded string from in
StringreadString(DataInput in, int maxLength)
Read a UTF8 encoded string with a maximum size
voidset(String string)
Set to contain the contents of a string.
voidset(byte[] utf8)
Set to a utf8 byte array
voidset(Text other)
copy a text.
voidset(byte[] utf8, int start, int len)
Set the Text to range of bytes
voidskip(DataInput in)
Skips over one Text in the input.
StringtoString()
Convert text back to string
voidwrite(DataOutput out)
serialize write this object to out length uses zero-compressed encoding
intwriteString(DataOutput out, String s)
Write a UTF8 encoded string to out