Back to Fresco

ImageFormatCheckerUtils

docs/javadoc/reference/com/facebook/imageformat/ImageFormatCheckerUtils.html

3.6.012.4 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Packages | Classes

Summary: Methods | Inherited Methods | [Expand All]

public class

ImageFormatCheckerUtils

extends Object

| java.lang.Object | | ↳ | com.facebook.imageformat.ImageFormatCheckerUtils |

Class Overview

ImageFormatChecker utility methods

Summary

Public Methods
static byte[]
Helper method that transforms provided string into it's byte representation using ASCII encoding.
static boolean
Checks if byteArray interpreted as sequence of bytes starts with pattern starting at position equal to offset.
static int
Checks if byteArray interpreted as sequence of bytes contains the pattern.
static boolean
Checks if byteArray interpreted as sequence of bytes starts with pattern starting at position equal to offset.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Methods

public static byte[] asciiBytes(String value)

Helper method that transforms provided string into it's byte representation using ASCII encoding.

Parameters

| value | the string to use |

Returns
  • byte array representing ascii encoded value

public static boolean hasPatternAt(byte[] byteArray, byte[] pattern, int offset)

Checks if byteArray interpreted as sequence of bytes starts with pattern starting at position equal to offset.

Parameters

| byteArray | the byte array to be checked | | pattern | the pattern to check |

Returns
  • true if byteArray starts with pattern

public static int indexOfPattern(byte[] byteArray, int byteArrayLen, byte[] pattern, int patternLen)

Checks if byteArray interpreted as sequence of bytes contains the pattern.

Parameters

| byteArray | the byte array to be checked | | pattern | the pattern to check |

Returns
  • index of beginning of pattern, if found; otherwise -1

public static boolean startsWithPattern(byte[] byteArray, byte[] pattern)

Checks if byteArray interpreted as sequence of bytes starts with pattern starting at position equal to offset.

Parameters

| byteArray | the byte array to be checked | | pattern | the pattern to check |

Returns
  • true if byteArray starts with pattern

+Generated by Doclava. +