src/org/jnetpcap/protocol/tcpip/Tcp.java
public static Set<Flag> asSet(final int flags) {
			final Set<Flag> set = EnumSet.noneOf(Tcp.Flag.class);
			final int len = values().length;

			for (int i = 0; i < len; i++) {
				if ((flags & (1 << i)) > 0) {
					set.add(values()[i]);
				}
			}

			return set;
		}
/**
		 * Converts 8 contigeous bits of an inteteger to a set collection of enum
		 * constants, each representing if a flag is set in the original integer.
		 * 
		 * @param flags
		 *          integer containing the flags (8-bits)
		 * @return a collection set with constants for each bit set within the
		 *         integer
		 */
Converts 8 contigeous bits of an inteteger to a set collection of enum
constants, each representing if a flag is set in the original integer.

@param flags
integer containing the flags (8-bits)
@return a collection set with constants for each bit set within the
integer
Converts 8 contigeous bits of an inteteger to a set collection of enum constants each representing if a flag is set in the original integer . @param flags integer containing the flags ( 8 - bits ) @return a collection set with constants for each bit set within the integer
public static Set<Flag> asSet(final int flags) {
			final Set<Flag> set = EnumSet.noneOf(Tcp.Flag.class);
			final int len = values().length;
			for (int i = 0; i < len; i++) {
				if ((flags & (1 << i)) > 0) {
					set.add(values()[i]);
				}
			}
			return set;
		}
public static Set < Flag > asSet ( final int flags ) { final Set < Flag > set = EnumSet . noneOf ( Tcp . Flag . class ) ; final int len = values ( ) . length ; for ( int i = 0 ; i < len ; i ++ ) { if ( ( flags & ( 1 << i ) ) > 0 ) { set . add ( values ( ) [ i ] ) ; } } return set ; }
Converts 8 contigeous bits of an inteteger to a set collection of enum
 constants, each representing if a flag is set in the original integer.
Converts 8 contigeous bits of an inteteger to a set collection of enum constants each representing if a flag is set in the original integer .