Uses of Class
io.airlift.slice.Slice
Packages that use Slice
-
Uses of Slice in io.airlift.slice
Fields in io.airlift.slice declared as SliceMethods in io.airlift.slice that return SliceModifier and TypeMethodDescriptionstatic SliceSlices.allocate(int capacity) static SliceSliceUtf8.codePointToUtf8(int codePoint) Convert the code point to UTF-8.static SliceSlices.copiedBuffer(String string, Charset charset) Slice.copy()Returns a copy of this buffer's sub-region.Slice.copy(int index, int length) Returns a copy of the specified region.DynamicSliceOutput.copySlice()static SliceSlices.ensureSize(Slice existingSlice, int minWritableBytes) static SliceSliceUtf8.fixInvalidUtf8(Slice slice) static SliceSliceUtf8.fixInvalidUtf8(Slice slice, OptionalInt replacementCodePoint) ChunkedSliceInput.BufferReference.getSlice()BasicSliceOutput.getUnderlyingSlice()DynamicSliceOutput.getUnderlyingSlice()OutputStreamSliceOutput.getUnderlyingSlice()abstract SliceSliceOutput.getUnderlyingSlice()Returns the raw underlying slice of this output stream.static Slicestatic Slicestatic Slicestatic SliceRemoves all white space characters from the left side of the string.static SliceRemoves allwhiteSpaceCodePointsfrom the left side of the string.static SliceSlices.random(int capacity) Allocates a new slice containing random bytes from ThreadLocalRandom.static SliceAllocates a new slice containing random bytes.BasicSliceInput.readSlice(int length) Returned slice is a view oversliceChunkedSliceInput.readSlice(int length) InputStreamSliceInput.readSlice(int length) abstract SliceSliceInput.readSlice(int length) Returns a new slice of this buffer's sub-region starting at the currentpositionand increases thepositionby the size of the new slice (=length).static SliceReverses the slice code point by code point.static SliceRemoves all white space characters from the right side of the string.static SliceRemoves all whitewhiteSpaceCodePointsfrom the right side of the string.BasicSliceInput.slice()Returns a slice of this buffer's readable bytes.BasicSliceOutput.slice()DynamicSliceOutput.slice()OutputStreamSliceOutput.slice()Slice.slice(int index, int length) Returns a slice of this buffer's sub-region.abstract SliceSliceOutput.slice()Returns a slice of this buffer's readable bytes.static SliceGets the substring starting atcodePointStartand extending forcodePointLengthcode points.static SliceSliceUtf8.toLowerCase(Slice utf8) Converts slice to lower case code point by code point.static SliceSliceUtf8.toUpperCase(Slice utf8) Converts slice to upper case code point by code point.static SliceRemoves all white space characters from the left and right side of the string.static SliceRemoves all whitewhiteSpaceCodePointsfrom the left and right side of the string.static Slicestatic SliceSlices.wrappedBuffer(byte... array) Creates a slice over the specified array.static SliceSlices.wrappedBuffer(byte[] array, int offset, int length) Creates a slice over the specified array range.static SliceSlices.wrappedHeapBuffer(ByteBuffer buffer) Methods in io.airlift.slice with parameters of type SliceModifier and TypeMethodDescriptionBasicSliceOutput.appendBytes(Slice slice) DynamicSliceOutput.appendBytes(Slice slice) OutputStreamSliceOutput.appendBytes(Slice slice) abstract SliceOutputSliceOutput.appendBytes(Slice slice) intCompares a portion of this slice with a portion of the specified slice.intCompares the content of the specified buffer to the content of this buffer.static intSliceUtf8.compareUtf16BE(Slice utf8Left, Slice utf8Right) Compares to UTF-8 sequences using UTF-16 big endian semantics.static intSliceUtf8.countCodePoints(Slice utf8) Counts the code points within UTF-8 encoded slice.static intSliceUtf8.countCodePoints(Slice utf8, int offset, int length) Counts the code points within UTF-8 encoded slice up tolength.static SliceSlices.ensureSize(Slice existingSlice, int minWritableBytes) booleanCompares a portion of this slice with a portion of the specified slice.static SliceSliceUtf8.fixInvalidUtf8(Slice slice) static SliceSliceUtf8.fixInvalidUtf8(Slice slice, OptionalInt replacementCodePoint) voidTransfers a portion of data from this slice into the specified destination starting at the specified absoluteindex.voidTransfers a portion of data from this slice into the specified destination starting at the specified absoluteindex.static intSliceUtf8.getCodePointAt(Slice utf8, int position) Gets the UTF-8 encoded code point at theposition.static intSliceUtf8.getCodePointBefore(Slice utf8, int position) Gets the UTF-8 encoded code point before theposition.static Slicestatic Slicestatic Slicestatic intstatic intstatic intstatic longstatic longstatic longstatic longstatic intstatic intstatic longstatic longstatic longReturns the 64 most significant bits of the Murmur128 hash of the provided valuestatic longstatic longintReturns the index of the first occurrence of the pattern with this slice.intReturns the index of the first occurrence of the pattern with this slice.static booleanDoes the slice contain only 7-bit ASCII characters.static SliceRemoves all white space characters from the left side of the string.static SliceRemoves allwhiteSpaceCodePointsfrom the left side of the string.static intSliceUtf8.lengthOfCodePoint(Slice utf8, int position) Gets the UTF-8 sequence length of the code point atposition.static intSliceUtf8.lengthOfCodePointSafe(Slice utf8, int position) Gets the UTF-8 sequence length of the code point atposition.static intSliceUtf8.offsetOfCodePoint(Slice utf8, int codePointCount) Finds the index of the first byte of the code point at a position, or-1if the position is not within the slice.static intSliceUtf8.offsetOfCodePoint(Slice utf8, int position, int codePointCount) Starting frompositionbytes inutf8, finds the index of the first byte of the code pointcodePointCountin the slice.voidvoidvoidfinal voidTransfers this buffer's data to the specified destination starting at the currentpositionuntil the destination becomes non-writable, and increases thepositionby the number of the transferred bytes.final voidTransfers this buffer's data to the specified destination starting at the currentpositionand increases thepositionby the number of the transferred bytes (=length).abstract voidTransfers this buffer's data to the specified destination starting at the currentpositionand increases thepositionby the number of the transferred bytes (=length).static SliceReverses the slice code point by code point.static SliceRemoves all white space characters from the right side of the string.static SliceRemoves all whitewhiteSpaceCodePointsfrom the right side of the string.voidTransfers data from the specified slice into this buffer starting at the specified absoluteindex.voidTransfers data from the specified slice into this buffer starting at the specified absoluteindex.static intSliceUtf8.setCodePointAt(int codePoint, Slice utf8, int position) Sets the UTF-8 sequence for code point at theposition.static SliceGets the substring starting atcodePointStartand extending forcodePointLengthcode points.static SliceSliceUtf8.toLowerCase(Slice utf8) Converts slice to lower case code point by code point.static SliceSliceUtf8.toUpperCase(Slice utf8) Converts slice to upper case code point by code point.static SliceRemoves all white space characters from the left and right side of the string.static SliceRemoves all whitewhiteSpaceCodePointsfrom the left and right side of the string.static intSliceUtf8.tryGetCodePointAt(Slice utf8, int position) Tries to get the UTF-8 encoded code point at theposition.voidBasicSliceOutput.writeBytes(Slice source) voidBasicSliceOutput.writeBytes(Slice source, int sourceIndex, int length) voidDynamicSliceOutput.writeBytes(Slice source) voidDynamicSliceOutput.writeBytes(Slice source, int sourceIndex, int length) voidOutputStreamSliceOutput.writeBytes(Slice source) voidOutputStreamSliceOutput.writeBytes(Slice source, int sourceIndex, int length) abstract voidSliceOutput.writeBytes(Slice source) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexuntil the source buffer becomes unreadable, and increases thewriterIndexby the number of the transferred bytes.abstract voidSliceOutput.writeBytes(Slice source, int sourceIndex, int length) Transfers the specified source buffer's data to this buffer starting at the currentwriterIndexand increases thewriterIndexby the number of the transferred bytes (=length).Constructors in io.airlift.slice with parameters of type SliceModifierConstructorDescriptionBasicSliceInput(Slice slice) protectedBasicSliceOutput(Slice slice) -
Uses of Slice in io.airlift.slice.testing
Methods in io.airlift.slice.testing with parameters of type SliceModifier and TypeMethodDescriptionstatic voidSliceAssertions.assertSlicesEqual(Slice actual, Slice expected)