Class UTFStringParser

    • Constructor Summary

      Constructors 
      Constructor Description
      UTFStringParser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] createArray​(int length)
      Creates an array
      ContentType<?> getValueType()  
      java.lang.String readElement​(byte[] bytes, Offset offset)
      Reads an objects from a byte array starting at a given offset.
      static java.lang.String readString​(byte[] bytes, Offset offset)  
      private static int readUnsignedShort​(byte[] bytes, int offset)  
      java.lang.Object readValue​(byte[] bytes, Offset offset, long timestamp)
      Reads an objects from a byte array starting at a given offset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UTFStringParser

        UTFStringParser()
    • Method Detail

      • readValue

        public java.lang.Object readValue​(byte[] bytes,
                                          Offset offset,
                                          long timestamp)
                                   throws InvalidJfrFileException
        Description copied from interface: IValueReader
        Reads an objects from a byte array starting at a given offset.
        Specified by:
        readValue in interface IValueReader
        offset - the offset to start read from. Will be moved to the end of the parsed data
        timestamp - the timestamp of the object to read
        Returns:
        the parsed object
        Throws:
        InvalidJfrFileException
      • readElement

        public java.lang.String readElement​(byte[] bytes,
                                            Offset offset)
                                     throws InvalidJfrFileException
        Description copied from interface: IArrayElementParser
        Reads an objects from a byte array starting at a given offset.
        Specified by:
        readElement in interface IArrayElementParser<java.lang.String>
        Parameters:
        bytes - the data to read the element from
        offset - the offset to start read from. Will be moved to the end of the parsed data
        Returns:
        the parsed element
        Throws:
        InvalidJfrFileException
      • readUnsignedShort

        private static int readUnsignedShort​(byte[] bytes,
                                             int offset)
      • createArray

        public java.lang.String[] createArray​(int length)
        Description copied from interface: IArrayElementParser
        Creates an array
        Specified by:
        createArray in interface IArrayElementParser<java.lang.String>
        Parameters:
        length - the length of the array to create
        Returns: