Package 

Class MimeMagicContext

  • All Implemented Interfaces:
    io.github.asperan.mimeinfo.context.Context

    
    public final class MimeMagicContext
     implements Context<Magic>
                        

    The context of Magic elements.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private UByte priority
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final UByte getPriority() The priority of the magic element.
      final Unit setPriority(UByte priority)
      final Unit match(Match.Type type, Match.Offset offset, String value, String mask) Add a match to the Magic element.
      Magic build() Build the object of the context.
      • Methods inherited from class java.lang.Object

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

      • MimeMagicContext

        MimeMagicContext()
    • Method Detail

      • match

         final Unit match(Match.Type type, Match.Offset offset, String value, String mask)

        Add a match to the Magic element.

        Parameters:
        type - The type of the match.
        offset - The offset of the match.
        value - The value of the match.
        mask - The mask for the match.
      • build

         Magic build()

        Build the object of the context.