public String decrypt(String cipherText, String associated) throws MissingParameterException, GeneralSecurityException

public String decrypt(String cipherText) throws MissingParameterException, GeneralSecurityException

public String encrypt(String clearText, String associated) throws MissingParameterException, GeneralSecurityException

public byte[] encrypt(byte[] clearText, byte[] associated) throws MissingParameterException, GeneralSecurityException

public byte[] encrypt(byte[] clearText) throws MissingParameterException, GeneralSecurityException

public byte[] decrypt(byte[] cipherText, byte[] associated) throws MissingParameterException, GeneralSecurityException

public byte[] decrypt(byte[] cipherText) throws MissingParameterException, GeneralSecurityException

public String encrypt(String clearText) throws MissingParameterException, GeneralSecurityException

/**
 * Encryption {@link KeysetHandle} to be used for encryption and decryption
 * options.
 */
@NonNull
private KeysetHandle key;

protected abstract byte[] performEncryption(byte[] data, byte[] associated) throws GeneralSecurityException

protected abstract byte[] performDecryption(byte[] data, byte[] associated) throws GeneralSecurityException


public void apply(PermutationSolution solution)

public void undo(PermutationSolution solution)

// first and last position of subsequence that will be reversed (cyclically)
private final int from, to;


public static byte[] prependZeros(int n, byte[] message)

public static byte[] removeZeros(int n, byte[] message)

public static void checkLength(byte[] data, int size)

public static boolean isValid(int status, String message)

public static byte[] slice(byte[] buffer, int start, int end)

public static byte[] merge(byte[] signature, byte[] message)

private static final int DEFAULT_SIZE = 32;


public byte[] decrypt(byte[] ciphertext)

private byte[] publicKey;
private byte[] privateKey;


public Toml read(InputStream inputStream)

public Toml read(String tomlString) throws IllegalStateException

public String getString(String key, String defaultValue)

public Long getLong(String key, Long defaultValue)

public List<T> getList(String key, List<T> defaultValue)

public Boolean getBoolean(String key, Boolean defaultValue)

public Date getDate(String key, Date defaultValue)

public Double getDouble(String key, Double defaultValue)

public boolean containsPrimitive(String key)

public boolean containsTable(String key)

public boolean containsTableArray(String key)

public Set<Map.Entry<String, Object>> entrySet()

private static final Gson DEFAULT_GSON = new Gson();

private Map<String, Object> values = new HashMap<String, Object>();


public static String requiredStringEnum(Map<String, T> map, String key, List<String> options)

public static String populatedUrl(Map<String, T> map, String key)

public static String populatedString(Map<String, T> map, String key)

public static String requiredString(Map<String, T> map, String key)

public static String populatedStringOfType(Map<String, T> map, String key, String type)

public static String requiredStringOfType(Map<String, T> map, String key, String type)

public static T required(Map<String, T> map, String key)


public ResponseWrapper registerUsers(RegisterPayload payload) throws APIConnectionException, APIRequestException

public ResponseWrapper registerAdmins(RegisterInfo payload) throws APIConnectionException, APIRequestException

public UserInfoResult getUserInfo(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper updateUserInfo(String username, UserPayload payload) throws APIConnectionException, APIRequestException

public UserStateResult getUserState(String username) throws APIConnectionException, APIRequestException

public UserStateListResult[] getUsersState(String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper updatePassword(String username, String password) throws APIConnectionException, APIRequestException

public ResponseWrapper deleteUser(String username) throws APIConnectionException, APIRequestException

public UserInfoResult[] getBlackList(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper addBlackList(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper removeBlackList(String username, String... users) throws APIConnectionException, APIRequestException

public UserListResult getUserList(int start, int count) throws APIConnectionException, APIRequestException

public UserListResult getAdminListByAppkey(int start, int count) throws APIConnectionException, APIRequestException

public ResponseWrapper setNoDisturb(String username, NoDisturbPayload payload) throws APIConnectionException, APIRequestException

public UserGroupsResult getGroupList(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper addFriends(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper deleteFriends(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper updateFriendsNote(String username, FriendNote[] array) throws APIConnectionException, APIRequestException

public UserInfoResult[] getFriendsInfo(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper setGroupShield(GroupShieldPayload payload, String username) throws APIConnectionException, APIRequestException

public ResponseWrapper forbidUser(String username, boolean disable) throws APIConnectionException, APIRequestException

private static final Logger LOG = LoggerFactory.getLogger(UserClient.class);


public ResponseWrapper registerUsers(RegisterPayload payload) throws APIConnectionException, APIRequestException

public ResponseWrapper registerAdmins(RegisterInfo payload) throws APIConnectionException, APIRequestException

public UserInfoResult getUserInfo(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper updateUserInfo(String username, UserPayload payload) throws APIConnectionException, APIRequestException

public UserStateResult getUserState(String username) throws APIConnectionException, APIRequestException

public UserStateListResult[] getUsersState(String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper updatePassword(String username, String password) throws APIConnectionException, APIRequestException

public ResponseWrapper deleteUser(String username) throws APIConnectionException, APIRequestException

public UserInfoResult[] getBlackList(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper addBlackList(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper removeBlackList(String username, String... users) throws APIConnectionException, APIRequestException

public UserListResult getUserList(int start, int count) throws APIConnectionException, APIRequestException

public UserListResult getAdminListByAppkey(int start, int count) throws APIConnectionException, APIRequestException

public ResponseWrapper setNoDisturb(String username, NoDisturbPayload payload) throws APIConnectionException, APIRequestException

public UserGroupsResult getGroupList(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper addFriends(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper deleteFriends(String username, String... users) throws APIConnectionException, APIRequestException

public ResponseWrapper updateFriendsNote(String username, FriendNote[] array) throws APIConnectionException, APIRequestException

public UserInfoResult[] getFriendsInfo(String username) throws APIConnectionException, APIRequestException

public ResponseWrapper setGroupShield(GroupShieldPayload payload, String username) throws APIConnectionException, APIRequestException

public ResponseWrapper forbidUser(String username, boolean disable) throws APIConnectionException, APIRequestException


public SendMessageResult sendMessage(MessagePayload payload) throws APIConnectionException, APIRequestException

public MessageListResult getMessageList(int count, String begin_time, String end_time) throws APIConnectionException, APIRequestException

public MessageListResult getMessageListByCursor(String cursor) throws APIConnectionException, APIRequestException

public MessageListResult getUserMessages(String username, int count, String begin_time, String end_time) throws APIConnectionException, APIRequestException

public MessageListResult getUserMessagesByCursor(String username, String cursor) throws APIConnectionException, APIRequestException

public ResponseWrapper retractMessage(String username, long messageId) throws APIConnectionException, APIRequestException

public ChatRoomHistoryResult getChatRoomHistory(Long chatroomid, int count, String beginTime, String endTime) throws APIConnectionException, APIRequestException

public ChatRoomHistoryResult getChatRoomHistory(Long chatroomid, String cursor) throws APIConnectionException, APIRequestException

//private static final Logger LOG = LoggerFactory.getLogger(MessageClient.class);
private String messagePath;


public GroupInfoResult getGroupInfo(long gid) throws APIConnectionException, APIRequestException

public MemberListResult getGroupMembers(long gid) throws APIConnectionException, APIRequestException

public GroupListResult getGroupListByAppkey(int start, int count) throws APIConnectionException, APIRequestException

public CreateGroupResult createGroup(GroupPayload payload) throws APIConnectionException, APIRequestException

public ResponseWrapper addOrRemoveMembers(long gid, Members add, Members remove) throws APIConnectionException, APIRequestException

public ResponseWrapper deleteGroup(long gid) throws APIConnectionException, APIRequestException

public ResponseWrapper updateGroupInfo(long gid, String groupName, String groupDesc, String avatar) throws APIConnectionException, APIRequestException

public ResponseWrapper changeGroupAdmin(long gid, String appKey, String username) throws APIConnectionException, APIRequestException

public ResponseWrapper setGroupMemberSilence(long gid, boolean status, String[] usernames) throws APIConnectionException, APIRequestException

private static final Logger LOG = LoggerFactory.getLogger(GroupClient.class);


public Path downloadFile(URL fileUrl) throws IOException

private static final Logger log = LoggerFactory.getLogger(SimpleFileDownloader.class);

protected Path copyLocalFile(URL fileUrl) throws IOException

protected Path downloadFileHttp(URL fileUrl) throws IOException


public void verify(Context context, Path file) throws VerifyException, IOException


public static short safeIntToShort(int i)

public static long safeDoubleToLong(double d)

public static int safeDoubleToInt(double d)

public static float safeDoubleToFloat(double d)

public static byte safeIntToUnsignedByte(int i)

public static short safeIntToUnsignedShort(int i)

public static int safeUnsignedByteToInt(byte b)

public static int safeUnsignedShortToInt(short s)

public static long safeUnsignedIntToLong(int i)

public static int[] safeLongToInt(long[] longArray)

public static long[] toLong(int[] intArray)


public static long[] ensureCapacity(long[] elements, int size)

private static final long serialVersionUID = 1L;

/**
 * The internal array representing this list.
 */
protected long[] elements;

/**
 * The number of elements in the list.
 */
protected int size;


public int lookupIndex(double value, double delta)

public static double[] ensureCapacity(double[] elements, int size)

/**
 * The internal array representing this list.
 */
protected double[] elements;


/**
 * Set this flag using {@link CsvColumn#converterFlags()} if you want a parse error to be generated if the value is
 * not either false or true (or the ones specified in the format). Default is that an invalid value will generate
 * false.
 */
public static final long PARSE_ERROR_ON_INVALID_VALUE = 1 << 1;

/**
 * Set this flag using {@link CsvColumn#converterFlags()} if you want the boolean formats to be compared
 * case-sensitively. So "TRUE" and "True" would be converted into false. Default is case-insensitive.
 */
public static final long CASE_SENSITIVE = 1 << 2;

/**
 * Set this flag using {@link CsvColumn#converterFlags()} if you want the output to be surrounded by quotes. Default
 * is none.
 */
public static final long NEEDS_QUOTES = 1 << 3;

public static BooleanConverter getSingleton()

public ConfigInfo configure(String format, long flags, ColumnInfo<Boolean> fieldInfo)

public boolean isNeedsQuotes(ConfigInfo configInfo)

public String javaToString(ColumnInfo<Boolean> columnInfo, Boolean value)

public Boolean stringToJava(String line, int lineNumber, int linePos, ColumnInfo<Boolean> columnInfo, String value, ParseError parseError)

private boolean isEquals(ConfigInfo configInfo, String value, String formatValue)

private static final BooleanConverter singleton = new BooleanConverter();

private static final String DEFAULT_TRUE_STRING = "true";

private static final String DEFAULT_FALSE_STRING = "false";


public Map<String, Date> getInactiveDevices() throws NetworkIOException

public void testConnection() throws NetworkIOException

private static final Logger logger = LoggerFactory.getLogger(QueuedApnsService.class);

private AtomicBoolean started = new AtomicBoolean(false);

private final ThreadFactory threadFactory;

private volatile boolean shouldContinue;


public Socket build(SSLSocketFactory factory, Proxy proxy, String proxyUsername, String proxyPassword, String host, int port) throws IOException

private Socket AuthenticateProxy(ConnectMethod method, ProxyClient client, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword) throws IOException

private static final Logger logger = LoggerFactory.getLogger(TlsTunnelBuilder.class);


/**
 * The default number of entries for the root directory.
 *
 * @see #getRootDirEntryCount()
 * @see #setRootDirEntryCount(int)
 */
public static final int DEFAULT_ROOT_DIR_ENTRY_COUNT = 512;

/**
 * The default volume label.
 */
//NOI18N
public static final String DEFAULT_VOLUME_LABEL = "NO NAME";

/**
 * The maximum number of clusters for a FAT12 file system. This is actually
 * the number of clusters where mkdosfs stop complaining about a FAT16
 * partition having not enough sectors, so it would be misinterpreted
 * as FAT12 without special handling.
 *
 * @see #getNrLogicalSectors()
 */
public static final int MAX_FAT12_CLUSTERS = 4084;

public static final int MAX_FAT16_CLUSTERS = 65524;

/**
 * The offset to the sectors per FAT value.
 */
public static final int SECTORS_PER_FAT_OFFSET = 0x16;

/**
 * The offset to the root directory entry count value.
 *
 * @see #getRootDirEntryCount()
 * @see #setRootDirEntryCount(int)
 */
public static final int ROOT_DIR_ENTRIES_OFFSET = 0x11;

/**
 * The offset to the first byte of the volume label.
 */
public static final int VOLUME_LABEL_OFFSET = 0x2b;

/**
 * Offset to the FAT file system type string.
 *
 * @see #getFileSystemType()
 */
public static final int FILE_SYSTEM_TYPE_OFFSET = 0x36;

/**
 * The maximum length of the volume label.
 */
public static final int MAX_VOLUME_LABEL_LENGTH = 11;

public static final int EXTENDED_BOOT_SIGNATURE_OFFSET = 0x26;

public void setVolumeLabel(String label) throws IllegalArgumentException

public void setRootDirEntryCount(int v) throws IllegalArgumentException


/**
 * The first cluster that really holds user data in a FAT.
 */
public final static int FIRST_CLUSTER = 2;

public static Fat read(BootSector bs, int fatNr) throws IOException, IllegalArgumentException

public static Fat create(BootSector bs, int fatNr) throws IOException, IllegalArgumentException

public void writeCopy(long offset) throws IOException

public long[] getChain(long startCluster)

public long getNextCluster(long cluster)

public long allocNew() throws IOException

public long[] allocNew(int nrClusters) throws IOException

public long allocAppend(long cluster) throws IOException

private void init(int mediumDescriptor)
private void read() throws IOException

private final long[] entries;
private final FatType fatType;
private final int sectorCount;
private final int sectorSize;
private final BlockDevice device;
private final BootSector bs;
private final long offset;
private final int lastClusterIndex;
private int lastAllocatedCluster;

protected boolean isFreeCluster(long entry)

protected boolean isReservedCluster(long entry)

protected boolean isEofCluster(long entry)

protected void testCluster(long cluster) throws IllegalArgumentException


/**
 * The offset to the free cluster count value in the FS info sector.
 */
public static final int FREE_CLUSTERS_OFFSET = 0x1e8;

/**
 * The offset to the "last allocated cluster" value in this sector.
 */
public static final int LAST_ALLOCATED_OFFSET = 0x1ec;

/**
 * The offset to the signature of this sector.
 */
public static final int SIGNATURE_OFFSET = 0x1fe;

public static FsInfoSector read(Fat32BootSector bs) throws IOException

public static FsInfoSector create(Fat32BootSector bs) throws IOException

public void setFreeClusterCount(long value)

public void setLastAllocatedCluster(long value)

private static int offset(Fat32BootSector bs)

private void verify() throws IOException


public void setLength(long length) throws ReadOnlyException, IOException

public void read(long offset, ByteBuffer dest) throws IOException

public void write(long offset, ByteBuffer srcBuf) throws ReadOnlyException, IOException

public void flush() throws ReadOnlyException

private void updateTimeStamps(boolean write)

private final FatDirectoryEntry entry;
private final ClusterChain chain;


public static Fat16RootDirectory read(Fat16BootSector bs, boolean readOnly) throws IOException

public static Fat16RootDirectory create(Fat16BootSector bs) throws IOException

private final BlockDevice device;
private final long deviceOffset;

protected void read(ByteBuffer data) throws IOException

protected void write(ByteBuffer data) throws IOException

protected void changeSize(int entryCount) throws DirectoryFullException


/**
 * Offset to the byte specifying the number of FATs.
 *
 * @see #getNrFats()
 * @see #setNrFats(int)
 */
public static final int FAT_COUNT_OFFSET = 16;

public static final int RESERVED_SECTORS_OFFSET = 14;

public static final int TOTAL_SECTORS_16_OFFSET = 19;

public static final int TOTAL_SECTORS_32_OFFSET = 32;

/**
 * The length of the file system type string.
 *
 * @see #getFileSystemType()
 */
public static final int FILE_SYSTEM_TYPE_LENGTH = 8;

/**
 * The offset to the sectors per cluster value stored in a boot sector.
 *
 * @see #getSectorsPerCluster()
 * @see #setSectorsPerCluster(int)
 */
public static final int SECTORS_PER_CLUSTER_OFFSET = 0x0d;

public static final int EXTENDED_BOOT_SIGNATURE = 0x29;

/**
 * The size of a boot sector in bytes.
 */
public final static int SIZE = 512;

public static BootSector read(BlockDevice device) throws IOException

public abstract void setSectorsPerFat(long v)

public abstract void setSectorCount(long count)

public abstract int getRootDirEntryCount()

public final long getFatOffset(int fatNr)

public abstract int getFileSystemTypeLabelOffset()

public abstract int getExtendedBootSignatureOffset()

public void setFileSystemTypeLabel(String fsType) throws IllegalArgumentException

private static boolean isPowerOfTwo(int n)

protected void setNrLogicalSectors(int v)

protected void setNrTotalSectors(long v)


/**
 * The number of bytes per sector for all {@code FileDisk} instances.
 */
public final static int BYTES_PER_SECTOR = 512;

public static FileDisk create(File file, long size) throws IOException, IllegalArgumentException

public long getSize() throws IOException

public void read(long devOffset, ByteBuffer dest) throws IOException

public void write(long devOffset, ByteBuffer src) throws IOException

private final RandomAccessFile raf;
private final FileChannel fc;
private final boolean readOnly;
private boolean closed;


public static void forEachLooped(Iterable<T> iterable, BiConsumer<T, T> consumer)

public static void forEach(Iterable<T> iterable, BiConsumer<T, T> consumer)

public static void forEachLooped(Iterable<T> iterable, TriConsumer<T> consumer)


public Attachment attachFile(long objectId, File file, String contentType)

public Attachment attachFile(long objectId, InputStream inputStream, String contentType, long contentLength, String fileName)


public String newAuthorizationURL(EnumSet<AccessScope> scopes, String state)

public AuthorizationResult extractAuthorizationResult(String authorizationResponseURL) throws URISyntaxException, OAuthAuthorizationCodeException

public Token obtainNewToken(AuthorizationResult authorizationResult) throws OAuthTokenException, JSONSerializerException, HttpClientException, URISyntaxException, InvalidRequestException

public Token refreshToken(Token token) throws OAuthTokenException, JSONSerializerException, HttpClientException, URISyntaxException, InvalidRequestException

public void revokeAccessToken(Token token) throws OAuthTokenException, JSONSerializerException, HttpClientException, URISyntaxException, InvalidRequestException

public void setHttpClient(HttpClient httpClient)

public void setJsonSerializer(JsonSerializer jsonSerializer)

public void setClientId(String clientId)

public void setClientSecret(String clientSecret)

public void setRedirectURL(String redirectURL)

public void setAuthorizationURL(String authorizationURL)

public void setTokenURL(String tokenURL)

private Token requestToken(String url) throws OAuthTokenException, JSONSerializerException, HttpClientException, URISyntaxException, InvalidRequestException

/**
 * Represents the HttpClient.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private HttpClient httpClient;

/**
 * Represents the JsonSerializer.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private JsonSerializer jsonSerializer;

/**
 * Represents the Client ID.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private String clientId;

/**
 * Represents the Client Secret.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private String clientSecret;

/**
 * Represents the redirect URL.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private String redirectURL;

/**
 * Represents the authorization URL.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private String authorizationURL;

/**
 * Represents the token URL.
 *
 * It will be initialized in constructor and will not change afterwards.
 */
private String tokenURL;


public String getAskingUrl()
public String getAskingName()
public String getQuestion()
public String getAnswer()
public PostType getType()
public void save()

private String asking_name, asking_url;
private String question;
private String answer;


public String getPermalinkUrl()
public String getThumbnailUrl()
public int getThumbnailWidth()
public int getThumbnailHeight()
public List<Video> getVideos()
public String getCaption()
public void setEmbedCode(String embed)
public void setData(File file)
public void setCaption(String caption)
public PostType getType()
public Map<String, Object> detail()

private List<Video> player;
private String caption;
private String embed, permalink_url;
private File data;
private String thumbnail_url;
private int thumbnail_width;
private int thumbnail_height;


public String getAudioUrl()
public Integer getPlayCount()
public String getTrackName()
public String getAlbumName()
public String getArtistName()
public String getAlbumArtUrl()
public Integer getYear()
public Integer getTrackNumber()
public String getCaption()
public String getEmbedCode()
public void setExternalUrl(String url)
public void setData(File file)
public void setCaption(String caption)
public PostType getType()
public Map<String, Object> detail()

private String caption, player, audio_url;

private String album_art, artist, album, track_name;


public String getRedirectUrl(String path)

public ResponseWrapper postMultipart(String path, Map<String, ?> bodyMap) throws IOException

public ResponseWrapper post(String path, Map<String, ?> bodyMap)

public Token postXAuth(final String email, final String password)

public ResponseWrapper get(String path, Map<String, ?> map)

public OAuthRequest constructGet(String path, Map<String, ?> queryParams)

public void setConsumer(String consumerKey, String consumerSecret)

public void setToken(String token, String tokenSecret)

public static OAuthRequest convertToMultipart(OAuthRequest request, Map<String, ?> bodyMap) throws IOException

private OAuthRequest constructXAuthPost(String email, String password)

private OAuthRequest constructPost(String path, Map<String, ?> bodyMap)

private Token parseXAuthResponse(final Response response)

private String hostname = "api.tumblr.com";

private String xauthEndpoint = "https://www.tumblr.com/oauth/access_token";


/**
 * The set of all valid custom text field names.
 */
public static final Set<String> CUSTOM_TEXT_FIELD_NAMES = IntStream.rangeClosed(1, 12).mapToObj(x -> "udf_text_" + x).collect(Collectors.toSet());

/**
 * The set of all valid custom date field names.
 */
public static final Set<String> CUSTOM_DATE_FIELD_NAMES = IntStream.rangeClosed(1, 6).mapToObj(x -> "udf_date_" + x).collect(Collectors.toSet());

/**
 * The set of all valid custom pulldown field names.
 */
public static final Set<String> CUSTOM_PULLDOWN_FIELD_NAMES = IntStream.rangeClosed(1, 6).mapToObj(x -> "udf_pulldown_" + x).collect(Collectors.toSet());

public UpdateIndividualProfileRequest withIndividualId(int individualId)

public UpdateIndividualProfileRequest withSyncId(Integer syncId)

public UpdateIndividualProfileRequest withOtherId(String otherId)

public UpdateIndividualProfileRequest withGivingNumber(String givingNumber)

public UpdateIndividualProfileRequest withFirstName(String firstName)

public UpdateIndividualProfileRequest withLastName(String lastName)

public UpdateIndividualProfileRequest withMiddleName(String middleName)

public UpdateIndividualProfileRequest withLegalFirstName(String legalFirstName)

public UpdateIndividualProfileRequest withSalutation(String salutation)

public UpdateIndividualProfileRequest withSuffix(String suffix)

public UpdateIndividualProfileRequest withFamilyId(Integer familyId)

public UpdateIndividualProfileRequest withFamilyPosition(FamilyPosition familyPosition)

public UpdateIndividualProfileRequest withMaritalStatus(MaritalStatus maritalStatus)

public UpdateIndividualProfileRequest withGender(Gender gender)

public UpdateIndividualProfileRequest withBirthday(LocalDate birthday)

public UpdateIndividualProfileRequest withAnniversary(LocalDate anniversary)

public UpdateIndividualProfileRequest withDeceased(LocalDate deceased)

public UpdateIndividualProfileRequest withMembershipDate(LocalDate membershipDate)

public UpdateIndividualProfileRequest withMembershipEnd(LocalDate membershipEnd)

public UpdateIndividualProfileRequest withEmail(String email)

public UpdateIndividualProfileRequest withAddresses(List<Address> addresses)

public UpdateIndividualProfileRequest withPhones(List<Phone> phones)

public UpdateIndividualProfileRequest withEmergencyContactName(String emergencyContactName)

public UpdateIndividualProfileRequest withAllergies(String allergies)

public UpdateIndividualProfileRequest withConfirmedNoAllergies(Boolean confirmedNoAllergies)

public UpdateIndividualProfileRequest withBaptized(Boolean baptized)

public Map<String, String> getCustomTextFields()

public UpdateIndividualProfileRequest withCustomTextField(final String name, final String value)

public UpdateIndividualProfileRequest withCustomTextField(final int number, final String value)

public Map<String, LocalDate> getCustomDateFields()

public UpdateIndividualProfileRequest withCustomDateField(final String name, final LocalDate value)

public UpdateIndividualProfileRequest withCustomDateField(final int number, final LocalDate value)

public Map<String, Integer> getCustomPulldownFields()

public UpdateIndividualProfileRequest withCustomPulldownField(final String name, final Integer value)

public UpdateIndividualProfileRequest withCustomPulldownField(final int number, final Integer value)

public UpdateIndividualProfileRequest withModifiedById(Integer modifiedById)

private String transformUDFName(final String name)

private Map<String, String> customTextFields = new HashMap<>();

private Map<String, LocalDate> customDateFields = new HashMap<>();

private Map<String, Integer> customPulldownFields = new HashMap<>();


public UpdateIndividualProfileRequest withIndividualId(int individualId)

public UpdateIndividualProfileRequest withSyncId(Integer syncId)

public UpdateIndividualProfileRequest withOtherId(String otherId)

public UpdateIndividualProfileRequest withGivingNumber(String givingNumber)

public UpdateIndividualProfileRequest withFirstName(String firstName)

public UpdateIndividualProfileRequest withLastName(String lastName)

public UpdateIndividualProfileRequest withMiddleName(String middleName)

public UpdateIndividualProfileRequest withLegalFirstName(String legalFirstName)

public UpdateIndividualProfileRequest withSalutation(String salutation)

public UpdateIndividualProfileRequest withSuffix(String suffix)

public UpdateIndividualProfileRequest withFamilyId(Integer familyId)

public UpdateIndividualProfileRequest withFamilyPosition(FamilyPosition familyPosition)

public UpdateIndividualProfileRequest withMaritalStatus(MaritalStatus maritalStatus)

public UpdateIndividualProfileRequest withGender(Gender gender)

public UpdateIndividualProfileRequest withBirthday(LocalDate birthday)

public UpdateIndividualProfileRequest withAnniversary(LocalDate anniversary)

public UpdateIndividualProfileRequest withDeceased(LocalDate deceased)

public UpdateIndividualProfileRequest withMembershipDate(LocalDate membershipDate)

public UpdateIndividualProfileRequest withMembershipEnd(LocalDate membershipEnd)

public UpdateIndividualProfileRequest withEmail(String email)

public UpdateIndividualProfileRequest withAddresses(List<Address> addresses)

public UpdateIndividualProfileRequest withPhones(List<Phone> phones)

public UpdateIndividualProfileRequest withEmergencyContactName(String emergencyContactName)

public UpdateIndividualProfileRequest withAllergies(String allergies)

public UpdateIndividualProfileRequest withConfirmedNoAllergies(Boolean confirmedNoAllergies)

public UpdateIndividualProfileRequest withBaptized(Boolean baptized)

public Map<String, String> getCustomTextFields()

public UpdateIndividualProfileRequest withCustomTextField(final String name, final String value)

public UpdateIndividualProfileRequest withCustomTextField(final int number, final String value)

public Map<String, LocalDate> getCustomDateFields()

public UpdateIndividualProfileRequest withCustomDateField(final String name, final LocalDate value)

public UpdateIndividualProfileRequest withCustomDateField(final int number, final LocalDate value)

public Map<String, Integer> getCustomPulldownFields()

public UpdateIndividualProfileRequest withCustomPulldownField(final String name, final Integer value)

public UpdateIndividualProfileRequest withCustomPulldownField(final int number, final Integer value)

public UpdateIndividualProfileRequest withModifiedById(Integer modifiedById)


public GetIndividualProfilesResponse getIndividualProfiles(GetIndividualProfilesRequest request) throws IOException

public GetCustomFieldLabelsResponse getCustomFieldLabels() throws IOException

public GetLookupTableResponse getLookupTable(final GetLookupTableRequest request) throws IOException

public GetCampusListResponse getCampusList() throws IOException

public UpdateIndividualProfileResponse updateIndividualProfile(UpdateIndividualProfileRequest request) throws IOException

public GetGroupProfilesResponse getGroupProfiles(GetGroupProfilesRequest request) throws IOException

private URI makeURI(final String service, final Map<String, String> parameters)

private T makeRequest(final String api, final Map<String, String> params, final String form, final Class<T> clazz) throws IOException

private static final Map<String, String> EMPTY_MAP = Collections.emptyMap();

private static final IndividualProfileSerializer INDIVIDUAL_PROFILE_SERIALIZER = new IndividualProfileSerializer();


public T bindResponseXML(InputStream response, Class<T> responseClass) throws CCBParseException

private JAXBContext getJAXBContext(Class<? extends CCBAPIResponse> responseClass)

private final XMLInputFactory xmlInputFactory;

private final ConcurrentHashMap<Class<? extends CCBAPIResponse>, JAXBContext> jaxbContextCache;


public static final String URL = "http://www.gravatar.com/avatar/";

public static final String HTTPS_URL = "https://secure.gravatar.com/avatar/";

public static final String FILE_TYPE_EXTENSION = ".jpg";

public static final int DEFAULT_SIZE = 80;

public static final Rating DEFAULT_RATING = Rating.GENERAL_AUDIENCE;

public Gravatar setForceDefault(boolean forceDefault)

public Gravatar setRating(Rating rating)

public Gravatar setStandardDefaultImage(DefaultImage standardDefaultImage)

public Gravatar setCustomDefaultImage(String customDefaultImage, String encoding) throws UnsupportedEncodingException

public Gravatar setCustomDefaultImage(String customDefaultImage) throws UnsupportedEncodingException

private void addParameter(StringBuilder builder, String key, String value, boolean firstParameter)


public void addPolicy(Policy policy) throws PolicyException

public void setRegisterBlueprintsByPackage(String _package) throws RegisterBlueprintException

public void setRegisterBlueprints(Collection blueprints) throws RegisterBlueprintException

public void registerBlueprint(String className) throws RegisterBlueprintException

public void registerBlueprint(Class clazz) throws RegisterBlueprintException

public void registerBlueprint(Object blueprint) throws RegisterBlueprintException

public T createModel(Class<T> clazz) throws CreateModelException

public T createModel(Class<T> clazz, boolean withPolicies) throws CreateModelException

public T createModel(T referenceModel) throws CreateModelException

public T createModel(T referenceModel, boolean withPolicies) throws CreateModelException

public T createModel(Erector erector, T referenceModel, boolean withPolicies) throws CreateModelException

public Map<Class, Erector> getErectors()

public Map<Class, List<BlueprintPolicy>> getBlueprintPolicies()

public Map<Class, List<FieldPolicy>> getFieldPolicies()

private Map<String, Field> getAllFields(Class clazz)

private Map<String, Field> getAllFields(Class clazz, boolean isParent)

private Logger logger = LoggerFactory.getLogger(this.getClass());

private Map<Class, Erector> erectors = new HashMap<Class, Erector>();

private Map<Class, List<FieldPolicy>> fieldPolicies = new HashMap<Class, List<FieldPolicy>>();

private Map<Class, List<BlueprintPolicy>> blueprintPolicies = new HashMap<Class, List<BlueprintPolicy>>();

protected Object createNewInstance(Erector erector) throws BlueprintTemplateException


public static List<PathElement> parseHeader(String header)


public ProcBuilder withOutputStream(OutputStream stdout)

public ProcBuilder withErrorStream(OutputStream stderr)

public ProcBuilder withTimeoutMillis(long timeoutMillis)

public ProcBuilder withInputStream(InputStream stdin)

public ProcBuilder withInput(String input)

public ProcBuilder withInput(byte[] input)

public ProcBuilder withWorkingDirectory(File directory)

public ProcBuilder withArgs(String... args)

public ProcBuilder withExitStatuses(int[] exitstatuses)

public ProcBuilder withExpectedExitStatuses(Set<Integer> expectedExitStatuses)

public ProcBuilder withExpectedExitStatuses(int... expectedExitStatuses)

public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException

public static String run(String cmd, String... args)

public static String filter(String input, String cmd, String... args)

public ProcBuilder withVar(String var, String value)

public ProcBuilder withVars(Map<String, String> vars)

public ProcBuilder withOutputConsumer(StreamConsumer outputConsumer)

public ProcBuilder withErrorConsumer(StreamConsumer errorConsumer)

private ByteArrayOutputStream defaultStdout = new ByteArrayOutputStream();

private List<String> args = new ArrayList<String>();

private Map<String, String> env = new HashMap<>();

private OutputStream stdout = defaultStdout;

private Set<Integer> expectedExitStatuses = new HashSet<Integer>() {

    {
        add(0);
    }
};


public ProcBuilder withOutputStream(OutputStream stdout)

public ProcBuilder withErrorStream(OutputStream stderr)

public ProcBuilder withTimeoutMillis(long timeoutMillis)

public ProcBuilder withInputStream(InputStream stdin)

public ProcBuilder withInput(String input)

public ProcBuilder withInput(byte[] input)

public ProcBuilder withWorkingDirectory(File directory)

public ProcBuilder withArgs(String... args)

public ProcBuilder withExitStatuses(int[] exitstatuses)

public ProcBuilder withExpectedExitStatuses(Set<Integer> expectedExitStatuses)

public ProcBuilder withExpectedExitStatuses(int... expectedExitStatuses)

public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException

public static String run(String cmd, String... args)

public static String filter(String input, String cmd, String... args)

public ProcBuilder withVar(String var, String value)

public ProcBuilder withVars(Map<String, String> vars)

public ProcBuilder withOutputConsumer(StreamConsumer outputConsumer)

public ProcBuilder withErrorConsumer(StreamConsumer errorConsumer)


// Helper constant for counterName keys.
public static final String COUNTER_NAME = "counterName";

public Optional<Counter> getCounter(final String counterName)

public Optional<CounterOperation> getCounterOperation(String counterName, int shardNumber, UUID counterOperationId)

public Counter createCounter(final String counterName)

public Optional<Counter> getCounter(final String counterName, final boolean skipCache)

public void updateCounterDetails(final Counter incomingCounter)

public int determineRandomShardNumber(final Optional<Integer> optShardNumber, final int numShards)

public CounterOperation increment(final String counterName, final long amount)

public CounterOperation increment(final String counterName, final long amount, final int shardNumber, final UUID incrementOperationId)

public CounterOperation decrement(final String counterName, final long amount)

public CounterOperation decrement(final String counterName, final long amount, final int shardNumber, final UUID decrementOperationUuid)

public void reset(final String counterName)

public void delete(final String counterName)

public void onTaskQueueCounterDeletion(final String counterName)

private CounterOperation mutateCounterShard(final String counterName, final long amount, final Optional<Integer> optShardNumber, final UUID incrementOperationId)

private static final Logger logger = Logger.getLogger(ShardedCounterServiceImpl.class.getName());

// This indicates that cache should be used, and is equivalent to skipCache=false
private static final boolean USE_CACHE = false;

private static final boolean SKIP_CACHE = true;

// Used to indicate that, for a given operation, a CounterData already existed, so no new counter was created.
private static final boolean COUNTER_EXISTED = false;

// Used to indicate that, for a given operation, a new CounterData was created.
private static final boolean NEW_COUNTER_CREATED = true;

private static final int NUM_RETRIES_LIMIT = 10;

protected Optional<CounterData> getCounterData(final String counterName)

protected CounterData createCounterData(final String counterName)

protected CounterDataGetCreateContainer getOrCreateCounterData(final String counterName)

protected Optional<Long> incrementMemcacheAtomic(final String counterName, final long amount)

protected String assembleCounterKeyforMemcache(final String counterName)

protected void assertCounterAmountMutatable(final String counterName, final CounterStatus counterStatus)

protected void assertCounterDetailsMutatable(final String counterName, final CounterStatus counterStatus)

protected void assertValidExternalCounterStatus(final String counterName, final CounterStatus incomingCounterStatus)

protected boolean counterStatusYieldsIndeterminateCount(final CounterStatus counterStatus)

/**
 * A random number generating, for distributing writes across shards.
 */
protected final Random generator = new Random();

protected final MemcacheService memcacheService;

protected final ShardedCounterServiceConfiguration config;

protected final CounterNameValidator counterNameValidator;


public static String buildAuthHeader(String username, String token)

private static String base64Encode(byte[] bytes)


public String toString()
public boolean equals(final Object obj)
public int hashCode()

private final int length;
private final int responseCode;
private final int count;


private final int length;
private final int responseCode;
private final int responseLength;


public static String generalJmxUrlForHostNamePort(String hostName, int port)

public void closeThrow() throws JMException

public String[] getBeanDomains() throws JMException

public Set<ObjectName> getBeanNames() throws JMException

public Set<ObjectName> getBeanNames(String domain) throws JMException

public MBeanAttributeInfo[] getAttributesInfo(String domainName, String beanName) throws JMException

public MBeanAttributeInfo[] getAttributesInfo(ObjectName name) throws JMException

public MBeanAttributeInfo getAttributeInfo(ObjectName name, String attrName) throws JMException

public MBeanOperationInfo[] getOperationsInfo(String domainName, String beanName) throws JMException

public MBeanOperationInfo[] getOperationsInfo(ObjectName name) throws JMException

public MBeanOperationInfo getOperationInfo(ObjectName name, String oper) throws JMException

public Object getAttribute(String domain, String beanName, String attributeName) throws Exception

public Object getAttribute(ObjectName name, String attributeName) throws Exception

public String getAttributeString(String domain, String beanName, String attributeName) throws Exception

public String getAttributeString(ObjectName name, String attributeName) throws Exception

public List<Attribute> getAttributes(ObjectName name, String[] attributes) throws Exception

public List<Attribute> getAttributes(String domain, String beanName, String[] attributes) throws Exception

public void setAttribute(String domainName, String beanName, String attrName, String value) throws Exception

public void setAttribute(ObjectName name, String attrName, String value) throws Exception

public void setAttribute(String domainName, String beanName, String attrName, Object value) throws Exception

public void setAttribute(ObjectName name, String attrName, Object value) throws Exception

public void setAttributes(ObjectName name, List<Attribute> attributes) throws Exception

public void setAttributes(String domainName, String beanName, List<Attribute> attributes) throws Exception

public Object invokeOperation(String domain, String beanName, String operName, String... paramStrings) throws Exception

public Object invokeOperation(ObjectName name, String operName, String... paramStrings) throws Exception

public String invokeOperationToString(ObjectName name, String operName, String... paramStrings) throws Exception

public Object invokeOperation(String domain, String beanName, String operName, Object... params) throws Exception

public Object invokeOperation(ObjectName objectName, String operName, Object... params) throws Exception

private static Map<String, Object> addCredentialsToMap(String userName, String password, Map<String, Object> environmentMap)

private Object invokeOperation(ObjectName objectName, String operName, String[] paramTypes, Object[] params) throws Exception

private String[] lookupParamTypes(ObjectName objectName, String operName, Object[] params) throws JMException

private boolean isClassNameEquivalent(String className1, String className2)

private String getWrapperClass(String className)

private MBeanAttributeInfo getAttrInfo(ObjectName objectName, String attrName) throws JMException

private JMException createJmException(String message, Exception e)

private final static Map<String, String> primitiveObjectMap = new HashMap<String, String>();


public static ObjectName makeObjectName(JmxResource jmxResource, JmxSelfNaming selfNamingObj)

public static ObjectName makeObjectName(JmxSelfNaming selfNamingObj)

public static ObjectName makeObjectName(JmxResource jmxResource, Object obj)

public static ObjectName makeObjectName(String domainName, String beanName, String[] folderNameStrings)

public static ObjectName makeObjectName(String domainName, String beanName)

public static ObjectName makeObjectName(String objectNameString)

public static ObjectName makeObjectName(Object obj)

private static ObjectName makeObjectName(String domainName, String beanName, JmxFolderName[] folderNames, String[] folderNameStrings)

private static void appendNumericalPrefix(StringBuilder sb, int prefixC)

private static String getBeanName(JmxResource jmxResource)

private static boolean isEmpty(String str)


public synchronized void start() throws JMException

public synchronized void stopThrow() throws JMException

public synchronized ObjectName register(Object obj) throws JMException

public synchronized void register(Object obj, ObjectName objectName, JmxAttributeFieldInfo[] attributeFieldInfos, JmxAttributeMethodInfo[] attributeMethodInfos, JmxOperationInfo[] operationInfos) throws JMException

public synchronized ObjectName register(PublishAllBeanWrapper wrapper) throws JMException

public synchronized ObjectName register(Object obj, JmxResourceInfo resourceInfo, JmxAttributeFieldInfo[] attributeFieldInfos, JmxAttributeMethodInfo[] attributeMethodInfos, JmxOperationInfo[] operationInfos) throws JMException

public synchronized void register(Object obj, ObjectName objectName, String description, JmxAttributeFieldInfo[] attributeFieldInfos, JmxAttributeMethodInfo[] attributeMethodInfos, JmxOperationInfo[] operationInfos) throws JMException

public void unregister(ObjectName objName)

public synchronized void unregisterThrow(Object obj) throws JMException

public synchronized void unregisterThrow(ObjectName objName) throws JMException

public void setInetAddress(InetAddress inetAddress)

public void setRegistryPort(int registryPort)

public void setServerPort(int serverPort)

public void setServerSocketFactory(RMIServerSocketFactory serverSocketFactory)

public void setServiceUrl(String serviceUrl)

public void setUsePlatformMBeanServer(boolean usePlatformMBeanServer)

private String getObjectDescription(Object obj)

private void doRegister(ObjectName objectName, ReflectionMbean mbean) throws JMException

private void startRmiRegistry() throws JMException

private void startJmxService() throws JMException

private final String RMI_SERVER_HOST_NAME_PROPERTY = "java.rmi.server.hostname";

private boolean serverHostNamePropertySet = false;


public Subject authenticate(Object credentials)

public void setAuthMap(Map<String, String> authMap)

private Map<String, String> authMap = Collections.emptyMap();


private static final long serialVersionUID = -85589867313315229L;


public Object fromBody(final TypedInput body, final Type type) throws ConversionException

public TypedOutput toBody(final Object object)


public boolean containsKey(final Object key)

public boolean containsValue(final Object value)

public V put(final K key, final V value)

public void putAll(final Map<? extends K, ? extends V> m)

private final Set<Map.Entry<K, V>> entries = new LinkedHashSet<>();


/**
 * The size, in octets, of the device identifier.
 */
public static final int DEVICE_ID_SIZE = 16;

/**
 * The identifier used for this message.
 */
public static final byte MESSAGE_TYPE = 6;

/**
 * An undefined physical layer type.
 */
public static final byte PHYSICAL_LAYER_UNDEFINED = (byte) 0xFF;

/**
 * Physical layer for filtering any physical layer type. This should not be
 * used as the type of a {@code SampleMessage}.
 */
public static final byte PHYSICAL_LAYER_ALL = 0;

/**
 * Physical layer for Pipsqueak devices.
 */
public static final byte PHYSICAL_LAYER_PIPSQUEAK = 1;

/**
 * Physical layer for WiFi devices.
 */
public static final byte PHYSICAL_LAYER_WIFI = 2;

/**
 * Physical layer for WINS devices.
 */
public static final byte PHYSICAL_LAYER_WINS = 3;

public void setPhysicalLayer(byte physicalLayer)

public void setDeviceId(byte[] deviceId)

public void setReceiverId(byte[] receiverId)

public void setReceiverTimeStamp(long receiverTimeStamp)

public void setSensedData(byte[] sensedData)

public static SampleMessage getTestMessage()

public SampleMessage clone() throws CloneNotSupportedException

/**
 * The physical layer type of the transmitter/receiver identified in this
 * message.
 */
private byte physicalLayer = PHYSICAL_LAYER_UNDEFINED;

/**
 * The device identifier for the transmitter referenced in this message.
 */
private byte[] deviceId;

/**
 * The device identifier for the receiver referenced in this message.
 */
private byte[] receiverId;

/**
 * The UNIX timestamp indicating when this sample was observed by the
 * receiver.
 */
private long receiverTimeStamp;

/**
 * The Received Signal Strength Indicator (RSSI) for this sample.
 */
private float rssi;

/**
 * The time when this message object was created.
 */
private final long creationTimestamp;

/**
 * The raw sensed data provided by the transmitter or receiver for this
 * sample.
 */
private byte[] sensedData = null;


public int compareTo(HashableByteArray other)

/**
 * The bacjubg byte array.
 */
private byte[] data;

/**
 * The computed hash value for this byte array.
 */
private int hashCode = 0;


public JoinPeerProposalBuilder genesisBlock(Block genesisBlock) throws ProposalException

public JoinPeerProposalBuilder context(TransactionContext context)

public static JoinPeerProposalBuilder newBuilder()

private static final Log logger = LogFactory.getLog(JoinPeerProposalBuilder.class);


public void addAttrReq() throws InvalidArgumentException

public AttrReq addAttrReq(String name) throws InvalidArgumentException

// A PEM-encoded string containing the CSR (Certificate Signing Request) based on PKCS #10
private String csr;

// Comma-separated list of host names to associate with the certificate
private Collection<String> hosts = new ArrayList<>();

// Name of the signing profile to use when issuing the certificate
private String profile = null;

// Label used in HSM operations
private String label = null;

// Key pair for generating certification request
private KeyPair keypair = null;

// The Certificate Authority's name
private String caName;

// Attribute requests. added v1.1
//new HashMap<>();
private Map<String, AttrReq> attrreqs = null;


public void setEnrollmentID(String enrollmentID)

public void setRevokedStart(Date revokedStart) throws InvalidArgumentException

public void setRevokedEnd(Date revokedEnd) throws InvalidArgumentException

public void setExpiredStart(Date expiredStart) throws InvalidArgumentException

public void setExpiredEnd(Date expiredEnd) throws InvalidArgumentException

public Map<String, String> getQueryParameters()

private final Map<String, String> queryParms = new HashMap<>();


public void isValid() throws InvalidDataException


public abstract void isValid() throws InvalidDataException

public void setPayload(ByteBuffer payload)

public void setTransferemasked(boolean transferemasked)

public static FramedataImpl1 get(Opcode opcode)

/**
 * Indicates that this is the final fragment in a message.
 */
private boolean fin;

/**
 * Defines the interpretation of the "Payload data".
 */
private Opcode optcode;

/**
 * The unmasked "Payload data" which was sent in this frame
 */
private ByteBuffer unmaskedpayload;

/**
 * Defines whether the "Payload data" is masked.
 */
private boolean transferemasked;

/**
 * Indicates that the rsv1 bit is set or not
 */
private boolean rsv1;

/**
 * Indicates that the rsv2 bit is set or not
 */
private boolean rsv2;

/**
 * Indicates that the rsv3 bit is set or not
 */
private boolean rsv3;


public boolean acceptProvidedProtocol(String inputProtocolHeader)

private static final Pattern patternSpace = Pattern.compile(" ");

private static final Pattern patternComma = Pattern.compile(",");

/**
 * Attribute for the provided protocol
 */
private final String providedProtocol;


public HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata) throws InvalidHandshakeException

public HandshakeState acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response) throws InvalidHandshakeException

public ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request)

public HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response) throws InvalidHandshakeException

public ByteBuffer createBinaryFrame(Framedata framedata)

public List<Framedata> translateFrame(ByteBuffer buffer) throws InvalidDataException

public List<Framedata> createFrames(ByteBuffer binary, boolean mask)

public List<Framedata> createFrames(String text, boolean mask)

public void processFrame(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException

private HandshakeState containsRequestedProtocol(String requestedProtocol)

private ByteBuffer createByteBufferFromFramedata(Framedata framedata)

private Framedata translateSingleFrame(ByteBuffer buffer) throws IncompleteException, InvalidDataException

private TranslatedPayloadMetaData translateSingleFramePayloadLength(ByteBuffer buffer, Opcode optcode, int oldPayloadlength, int maxpacketsize, int oldRealpacketsize) throws InvalidFrameException, IncompleteException, LimitExceededException

private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException

private void translateSingleFrameCheckPacketSize(int maxpacketsize, int realpacketsize) throws IncompleteException

private int getSizeBytes(ByteBuffer mes)

private String generateFinalKey(String in)

private byte[] toByteArray(long val, int bytecount)

private Opcode toOpcode(byte opcode) throws InvalidFrameException

private void processFrameContinuousAndNonFin(WebSocketImpl webSocketImpl, Framedata frame, Opcode curop) throws InvalidDataException

private void processFrameBinary(WebSocketImpl webSocketImpl, Framedata frame)

private void logRuntimeException(WebSocketImpl webSocketImpl, RuntimeException e)

private void processFrameText(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException

private void processFrameIsFin(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException

private void processFrameIsNotFin(Framedata frame) throws InvalidDataException

private void processFrameClosing(WebSocketImpl webSocketImpl, Framedata frame)

private void addToBufferList(ByteBuffer payloadData)

private void checkBufferLimit() throws LimitExceededException

private ByteBuffer getPayloadFromByteBufferList() throws LimitExceededException

/**
 * Handshake specific field for the key
 */
private static final String SEC_WEB_SOCKET_KEY = "Sec-WebSocket-Key";

/**
 * Handshake specific field for the protocol
 */
private static final String SEC_WEB_SOCKET_PROTOCOL = "Sec-WebSocket-Protocol";

/**
 * Handshake specific field for the extension
 */
private static final String SEC_WEB_SOCKET_EXTENSIONS = "Sec-WebSocket-Extensions";

/**
 * Handshake specific field for the accept
 */
private static final String SEC_WEB_SOCKET_ACCEPT = "Sec-WebSocket-Accept";

/**
 * Handshake specific field for the upgrade
 */
private static final String UPGRADE = "Upgrade";

/**
 * Handshake specific field for the connection
 */
private static final String CONNECTION = "Connection";

/**
 * Logger instance
 *
 * @since 1.4.0
 */
private final Logger log = LoggerFactory.getLogger(Draft_6455.class);

/**
 * Attribute for the used extension in this draft
 */
private IExtension extension = new DefaultExtension();

/**
 * Attribute for all available extension in this draft
 */
private List<IExtension> knownExtensions;

/**
 * Attribute for the used protocol in this draft
 */
private IProtocol protocol;

/**
 * Attribute for all available protocols in this draft
 */
private List<IProtocol> knownProtocols;

/**
 * Attribute for the current continuous frame
 */
private Framedata currentContinuousFrame;

/**
 * Attribute for the payload of the current continuous frame
 */
private final List<ByteBuffer> byteBufferList;

/**
 * Attribute for the current incomplete frame
 */
private ByteBuffer incompleteframe;

/**
 * Attribute for the reusable random instance
 */
private final SecureRandom reuseableRandom = new SecureRandom();

/**
 * Attribute for the maximum allowed size of a frame
 *
 * @since 1.4.0
 */
private int maxFrameSize;


public static int transferByteBuffer(ByteBuffer source, ByteBuffer dest)

public static ByteBuffer getEmptyByteBuffer()


/* ********  P U B L I C   F I E L D S  ******** */
/**
 * No options specified. Value is zero.
 */
public static final int NO_OPTIONS = 0;

/**
 * Specify encoding in first bit. Value is one.
 */
public static final int ENCODE = 1;

/**
 * Specify that data should be gzip-compressed in second bit. Value is two.
 */
public static final int GZIP = 2;

/**
 * Do break lines when encoding. Value is 8.
 */
public static final int DO_BREAK_LINES = 8;

/**
 * Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of
 * RFC3548:
 * http://www.faqs.org/rfcs/rfc3548.html.
 * It is important to note that data encoded this way is not officially valid Base64, or
 * at the very least should not be called Base64 without also specifying that is was encoded using
 * the URL- and Filename-safe dialect.
 */
public static final int URL_SAFE = 16;

/**
 * Encode using the special "ordered" dialect of Base64 described here:
 * http://www.faqs.org/qa/rfcc-1940.html.
 */
public static final int ORDERED = 32;

public static String encodeBytes(byte[] source)

public static String encodeBytes(byte[] source, int off, int len, int options) throws java.io.IOException

public static byte[] encodeBytesToBytes(byte[] source, int off, int len, int options) throws java.io.IOException

private static final byte[] getAlphabet(int options)

private static final byte[] getDecodabet(int options)

private static byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes, int options)

private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset, int options)

private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset, int options)

/* ********  P R I V A T E   F I E L D S  ******** */
/**
 * Maximum line length (76) of Base64 output.
 */
private static final int MAX_LINE_LENGTH = 76;

/**
 * The equals sign (=) as a byte.
 */
private static final byte EQUALS_SIGN = (byte) '=';

/**
 * The new line character (\n) as a byte.
 */
private static final byte NEW_LINE = (byte) '\n';

/**
 * Preferred encoding.
 */
private static final String PREFERRED_ENCODING = "US-ASCII";

// Indicates white space in encoding
private static final byte WHITE_SPACE_ENC = -5;

/* ********  S T A N D A R D   B A S E 6 4   A L P H A B E T  ******** */
/**
 * The 64 valid Base64 values.
 */
/* Host platform me be something funny like EBCDIC, so we hardcode these values. */
private static final byte[] _STANDARD_ALPHABET = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '+', (byte) '/' };

/**
 * Translates a Base64 value to either its 6-bit reconstruction value or a negative number
 * indicating some other meaning.
 */
private static final byte[] _STANDARD_DECODABET = { // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Whitespace: Tab and Linefeed
-5, // Whitespace: Tab and Linefeed
-5, // Decimal 11 - 12
-9, // Decimal 11 - 12
-9, // Whitespace: Carriage Return
-5, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Whitespace: Space
-5, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Plus sign at decimal 43
62, // Decimal 44 - 46
-9, // Decimal 44 - 46
-9, // Decimal 44 - 46
-9, // Slash at decimal 47
63, // Numbers zero through nine
52, // Numbers zero through nine
53, // Numbers zero through nine
54, // Numbers zero through nine
55, // Numbers zero through nine
56, // Numbers zero through nine
57, // Numbers zero through nine
58, // Numbers zero through nine
59, // Numbers zero through nine
60, // Numbers zero through nine
61, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Equals sign at decimal 61
-1, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Letters 'A' through 'N'
0, // Letters 'A' through 'N'
1, // Letters 'A' through 'N'
2, // Letters 'A' through 'N'
3, // Letters 'A' through 'N'
4, // Letters 'A' through 'N'
5, // Letters 'A' through 'N'
6, // Letters 'A' through 'N'
7, // Letters 'A' through 'N'
8, // Letters 'A' through 'N'
9, // Letters 'A' through 'N'
10, // Letters 'A' through 'N'
11, // Letters 'A' through 'N'
12, // Letters 'A' through 'N'
13, // Letters 'O' through 'Z'
14, // Letters 'O' through 'Z'
15, // Letters 'O' through 'Z'
16, // Letters 'O' through 'Z'
17, // Letters 'O' through 'Z'
18, // Letters 'O' through 'Z'
19, // Letters 'O' through 'Z'
20, // Letters 'O' through 'Z'
21, // Letters 'O' through 'Z'
22, // Letters 'O' through 'Z'
23, // Letters 'O' through 'Z'
24, // Letters 'O' through 'Z'
25, // Decimal 91 - 96
-9, // Decimal 91 - 96
-9, // Decimal 91 - 96
-9, // Decimal 91 - 96
-9, // Decimal 91 - 96
-9, // Decimal 91 - 96
-9, // Letters 'a' through 'm'
26, // Letters 'a' through 'm'
27, // Letters 'a' through 'm'
28, // Letters 'a' through 'm'
29, // Letters 'a' through 'm'
30, // Letters 'a' through 'm'
31, // Letters 'a' through 'm'
32, // Letters 'a' through 'm'
33, // Letters 'a' through 'm'
34, // Letters 'a' through 'm'
35, // Letters 'a' through 'm'
36, // Letters 'a' through 'm'
37, // Letters 'a' through 'm'
38, // Letters 'n' through 'z'
39, // Letters 'n' through 'z'
40, // Letters 'n' through 'z'
41, // Letters 'n' through 'z'
42, // Letters 'n' through 'z'
43, // Letters 'n' through 'z'
44, // Letters 'n' through 'z'
45, // Letters 'n' through 'z'
46, // Letters 'n' through 'z'
47, // Letters 'n' through 'z'
48, // Letters 'n' through 'z'
49, // Letters 'n' through 'z'
50, // Letters 'n' through 'z'
51, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9 };

/* ********  U R L   S A F E   B A S E 6 4   A L P H A B E T  ******** */
/**
 * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548:
 * http://www.faqs.org/rfcs/rfc3548.html.
 * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash."
 */
private static final byte[] _URL_SAFE_ALPHABET = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '-', (byte) '_' };

/**
 * Used in decoding URL- and Filename-safe dialects of Base64.
 */
private static final byte[] _URL_SAFE_DECODABET = { // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Whitespace: Tab and Linefeed
-5, // Whitespace: Tab and Linefeed
-5, // Decimal 11 - 12
-9, // Decimal 11 - 12
-9, // Whitespace: Carriage Return
-5, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Whitespace: Space
-5, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Plus sign at decimal 43
-9, // Decimal 44
-9, // Minus sign at decimal 45
62, // Decimal 46
-9, // Slash at decimal 47
-9, // Numbers zero through nine
52, // Numbers zero through nine
53, // Numbers zero through nine
54, // Numbers zero through nine
55, // Numbers zero through nine
56, // Numbers zero through nine
57, // Numbers zero through nine
58, // Numbers zero through nine
59, // Numbers zero through nine
60, // Numbers zero through nine
61, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Equals sign at decimal 61
-1, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Letters 'A' through 'N'
0, // Letters 'A' through 'N'
1, // Letters 'A' through 'N'
2, // Letters 'A' through 'N'
3, // Letters 'A' through 'N'
4, // Letters 'A' through 'N'
5, // Letters 'A' through 'N'
6, // Letters 'A' through 'N'
7, // Letters 'A' through 'N'
8, // Letters 'A' through 'N'
9, // Letters 'A' through 'N'
10, // Letters 'A' through 'N'
11, // Letters 'A' through 'N'
12, // Letters 'A' through 'N'
13, // Letters 'O' through 'Z'
14, // Letters 'O' through 'Z'
15, // Letters 'O' through 'Z'
16, // Letters 'O' through 'Z'
17, // Letters 'O' through 'Z'
18, // Letters 'O' through 'Z'
19, // Letters 'O' through 'Z'
20, // Letters 'O' through 'Z'
21, // Letters 'O' through 'Z'
22, // Letters 'O' through 'Z'
23, // Letters 'O' through 'Z'
24, // Letters 'O' through 'Z'
25, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Underscore at decimal 95
63, // Decimal 96
-9, // Letters 'a' through 'm'
26, // Letters 'a' through 'm'
27, // Letters 'a' through 'm'
28, // Letters 'a' through 'm'
29, // Letters 'a' through 'm'
30, // Letters 'a' through 'm'
31, // Letters 'a' through 'm'
32, // Letters 'a' through 'm'
33, // Letters 'a' through 'm'
34, // Letters 'a' through 'm'
35, // Letters 'a' through 'm'
36, // Letters 'a' through 'm'
37, // Letters 'a' through 'm'
38, // Letters 'n' through 'z'
39, // Letters 'n' through 'z'
40, // Letters 'n' through 'z'
41, // Letters 'n' through 'z'
42, // Letters 'n' through 'z'
43, // Letters 'n' through 'z'
44, // Letters 'n' through 'z'
45, // Letters 'n' through 'z'
46, // Letters 'n' through 'z'
47, // Letters 'n' through 'z'
48, // Letters 'n' through 'z'
49, // Letters 'n' through 'z'
50, // Letters 'n' through 'z'
51, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9 };

/* ********  O R D E R E D   B A S E 6 4   A L P H A B E T  ******** */
/**
 * I don't get the point of this technique, but someone requested it, and it is described here:
 * http://www.faqs.org/qa/rfcc-1940.html.
 */
private static final byte[] _ORDERED_ALPHABET = { (byte) '-', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) '_', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z' };

/**
 * Used in decoding the "ordered" dialect of Base64.
 */
private static final byte[] _ORDERED_DECODABET = { // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Decimal  0 -  8
-9, // Whitespace: Tab and Linefeed
-5, // Whitespace: Tab and Linefeed
-5, // Decimal 11 - 12
-9, // Decimal 11 - 12
-9, // Whitespace: Carriage Return
-5, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 14 - 26
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Decimal 27 - 31
-9, // Whitespace: Space
-5, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Decimal 33 - 42
-9, // Plus sign at decimal 43
-9, // Decimal 44
-9, // Minus sign at decimal 45
0, // Decimal 46
-9, // Slash at decimal 47
-9, // Numbers zero through nine
1, // Numbers zero through nine
2, // Numbers zero through nine
3, // Numbers zero through nine
4, // Numbers zero through nine
5, // Numbers zero through nine
6, // Numbers zero through nine
7, // Numbers zero through nine
8, // Numbers zero through nine
9, // Numbers zero through nine
10, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Decimal 58 - 60
-9, // Equals sign at decimal 61
-1, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Decimal 62 - 64
-9, // Letters 'A' through 'M'
11, // Letters 'A' through 'M'
12, // Letters 'A' through 'M'
13, // Letters 'A' through 'M'
14, // Letters 'A' through 'M'
15, // Letters 'A' through 'M'
16, // Letters 'A' through 'M'
17, // Letters 'A' through 'M'
18, // Letters 'A' through 'M'
19, // Letters 'A' through 'M'
20, // Letters 'A' through 'M'
21, // Letters 'A' through 'M'
22, // Letters 'A' through 'M'
23, // Letters 'N' through 'Z'
24, // Letters 'N' through 'Z'
25, // Letters 'N' through 'Z'
26, // Letters 'N' through 'Z'
27, // Letters 'N' through 'Z'
28, // Letters 'N' through 'Z'
29, // Letters 'N' through 'Z'
30, // Letters 'N' through 'Z'
31, // Letters 'N' through 'Z'
32, // Letters 'N' through 'Z'
33, // Letters 'N' through 'Z'
34, // Letters 'N' through 'Z'
35, // Letters 'N' through 'Z'
36, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Decimal 91 - 94
-9, // Underscore at decimal 95
37, // Decimal 96
-9, // Letters 'a' through 'm'
38, // Letters 'a' through 'm'
39, // Letters 'a' through 'm'
40, // Letters 'a' through 'm'
41, // Letters 'a' through 'm'
42, // Letters 'a' through 'm'
43, // Letters 'a' through 'm'
44, // Letters 'a' through 'm'
45, // Letters 'a' through 'm'
46, // Letters 'a' through 'm'
47, // Letters 'a' through 'm'
48, // Letters 'a' through 'm'
49, // Letters 'a' through 'm'
50, // Letters 'n' through 'z'
51, // Letters 'n' through 'z'
52, // Letters 'n' through 'z'
53, // Letters 'n' through 'z'
54, // Letters 'n' through 'z'
55, // Letters 'n' through 'z'
56, // Letters 'n' through 'z'
57, // Letters 'n' through 'z'
58, // Letters 'n' through 'z'
59, // Letters 'n' through 'z'
60, // Letters 'n' through 'z'
61, // Letters 'n' through 'z'
62, // Letters 'n' through 'z'
63, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 123 - 127
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 128 - 139
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 140 - 152
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 153 - 165
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 166 - 178
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 179 - 191
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 192 - 204
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 205 - 217
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 218 - 230
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 231 - 243
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9, // Decimal 244 - 255
-9 };


public void stop(int timeout) throws InterruptedException

public void stop() throws InterruptedException

public void setMaxPendingConnections(int numberOfConnections)

public final void onWebsocketMessage(WebSocket conn, String message)

public final void onWebsocketMessage(WebSocket conn, ByteBuffer blob)

public final void onWebsocketOpen(WebSocket conn, Handshakedata handshake)

public final void onWebsocketClose(WebSocket conn, int code, String reason, boolean remote)

public final void onWebsocketError(WebSocket conn, Exception ex)

public final void onWriteDemand(WebSocket w)

public void onWebsocketCloseInitiated(WebSocket conn, int code, String reason)

public void onWebsocketClosing(WebSocket conn, int code, String reason, boolean remote)

public void onCloseInitiated(WebSocket conn, int code, String reason)

public void onClosing(WebSocket conn, int code, String reason, boolean remote)

public final void setWebSocketFactory(WebSocketServerFactory wsf)

public final WebSocketFactory getWebSocketFactory()

public InetSocketAddress getLocalSocketAddress(WebSocket conn)

public InetSocketAddress getRemoteSocketAddress(WebSocket conn)

public abstract void onOpen(WebSocket conn, ClientHandshake handshake)

public abstract void onClose(WebSocket conn, int code, String reason, boolean remote)

public abstract void onMessage(WebSocket conn, String message)

public abstract void onError(WebSocket conn, Exception ex)

public void onMessage(WebSocket conn, ByteBuffer message)

public void broadcast(byte[] data, Collection<WebSocket> clients)

public void broadcast(ByteBuffer data, Collection<WebSocket> clients)

public void broadcast(String text, Collection<WebSocket> clients)

private void doAdditionalRead() throws InterruptedException, IOException

private void doAccept(SelectionKey key, Iterator<SelectionKey> i) throws IOException, InterruptedException

private boolean doRead(SelectionKey key, Iterator<SelectionKey> i) throws InterruptedException, WrappedIOException

private void doWrite(SelectionKey key) throws WrappedIOException

private ByteBuffer takeBuffer() throws InterruptedException

private void pushBuffer(ByteBuffer buf) throws InterruptedException

private void handleIOException(SelectionKey key, WebSocket conn, IOException ex)

private void handleFatal(WebSocket conn, Exception e)

private Socket getSocket(WebSocket conn)

private void doBroadcast(Object data, Collection<WebSocket> clients)

private void fillFrames(Draft draft, Map<Draft, List<Framedata>> draftFrames, String strData, ByteBuffer byteData)

private static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();

/**
 * Logger instance
 *
 * @since 1.4.0
 */
private final Logger log = LoggerFactory.getLogger(WebSocketServer.class);

/**
 * Holds the list of active WebSocket connections. "Active" means WebSocket handshake is complete
 * and socket can be written to, or read from.
 */
private final Collection<WebSocket> connections;

/**
 * The port number that this WebSocket server should listen on. Default is
 * WebSocketImpl.DEFAULT_PORT.
 */
private final InetSocketAddress address;

/**
 * The socket channel for this WebSocket server.
 */
private ServerSocketChannel server;

/**
 * The 'Selector' used to get event keys from the underlying socket.
 */
private Selector selector;

/**
 * The Draft of the WebSocket protocol the Server is adhering to.
 */
private List<Draft> drafts;

private final AtomicBoolean isclosed = new AtomicBoolean(false);

private final AtomicInteger queuesize = new AtomicInteger(0);

private WebSocketServerFactory wsf = new DefaultWebSocketServerFactory();

/**
 * Attribute which allows you to configure the socket "backlog" parameter which determines how
 * many client connections can be queued.
 *
 * @since 1.5.0
 */
private int maxPendingConnections = -1;

protected void allocateBuffers(WebSocket c) throws InterruptedException

protected void releaseBuffers(WebSocket c) throws InterruptedException

protected void queue(WebSocketImpl ws) throws InterruptedException

protected boolean removeConnection(WebSocket ws)

protected boolean addConnection(WebSocket ws)

protected boolean onConnect(SelectionKey key)


/**
 * attribute for the encoding exception
 */
private final UnsupportedEncodingException encodingException;


public static double[] readFileColumn(String filename, int columnIdx, int sizeLimit) throws IOException, SAXException

public static double[] readTS(BufferedReader br, int columnIdx, int sizeLimit) throws IOException, SAXException

public double[] readTS(String dataFileName, int loadLimit) throws SAXException, IOException

public double[] znorm(double[] series, double normalizationThreshold)

public double[] paa(double[] ts, int paaSize) throws SAXException

public char[] ts2String(double[] vals, double[] cuts)

public int[] ts2Index(double[] series, double[] cuts) throws Exception

public char num2char(double value, double[] cuts)

public int num2index(double value, double[] cuts)

public double[] subseriesByCopy(double[] series, int start, int end) throws IndexOutOfBoundsException

public String seriesToString(double[] series, NumberFormat df)

private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

// static block - we instantiate the logger
//
private static final Logger LOGGER = LoggerFactory.getLogger(TSProcessor.class);


public char[] ts2string(double[] ts, int paaSize, double[] cuts, double nThreshold) throws SAXException

public SAXRecords ts2saxByChunking(double[] ts, int paaSize, double[] cuts, double nThreshold) throws SAXException

public SAXRecords ts2saxViaWindow(double[] ts, int windowSize, int paaSize, double[] cuts, NumerosityReductionStrategy strategy, double nThreshold) throws SAXException

public SAXRecords ts2saxViaWindowGlobalZNorm(double[] ts, int windowSize, int paaSize, double[] cuts, NumerosityReductionStrategy strategy, double nThreshold) throws SAXException

public SAXRecords ts2saxViaWindowSkipping(double[] ts, int windowSize, int paaSize, double[] cuts, NumerosityReductionStrategy strategy, double nThreshold, ArrayList<Integer> skips) throws SAXException

public int strDistance(char[] a, char[] b) throws SAXException

public double saxMinDist(char[] a, char[] b, double[][] distanceMatrix, int n, int w) throws SAXException

public boolean checkMinDistIsZero(char[] a, char[] b)

public double approximationDistancePAA(double[] ts, int winSize, int paaSize, double normThreshold) throws Exception

public double approximationDistanceAlphabet(double[] ts, int winSize, int paaSize, int alphabetSize, double normThreshold) throws Exception

public Map<String, Integer> ts2Shingles(double[] series, int windowSize, int paaSize, int alphabetSize, NumerosityReductionStrategy strategy, double nrThreshold, int shingleSize) throws SAXException

public static String[] getAllPermutations(String[] alphabet, int wordLength)

public static String timeToString(long start, long finish)

private final TSProcessor tsProcessor;
private final NormalAlphabet na;
private EuclideanDistance ed;


public void markVisited(int from, int upTo)

public boolean isVisited(int from, int upTo)

public void transferVisited(VisitRegistry discordRegistry)

public VisitRegistry clone() throws CloneNotSupportedException

// unvisited counter
private int unvisitedCount;

private final Random randomizer = new Random(System.currentTimeMillis());

// 1 visited, 0 unvisited
protected byte[] registry;


public double[] getCuts(Integer size) throws SAXException

public double[][] getDistanceMatrix(Integer size) throws SAXException

public double[] getCentralCuts(Integer size) throws SAXException

/**
 * Maximal possible alphabet size.
 */
private static final int MAX_SIZE = 20;

// cut intervals
//
private static final double[] case2 = { 0 };

private static final double[] case3 = { -0.4307273, 0.4307273 };


public List<AccountReport> listReports(String accountId, String report) throws IOException

public Optional<AccountReport> reportStatus(String accountId, String report, Long id) throws IOException

public Optional<AccountReport> startReport(AccountReportOptions options) throws IOException

public Optional<AccountReport> deleteReport(String accountId, String report, Long reportId) throws IOException

private static final Logger LOG = LoggerFactory.getLogger(AccountReportImpl.class);


public GetAssignmentGroupOptions includes(List<Include> includes)

public GetAssignmentGroupOptions overrideAssignmentDates(Boolean overrideDates)

public GetAssignmentGroupOptions gradingPeriodId(Long periodId)

private String courseId;
private Long assignmentGroupId;


public String getName()
public String getContextRoot()
public URI getBaseURI()
public URI getFullURI()
public int hashCode()
public boolean equals(Object obj)
public String toString()

private String cleanContextRoot(String contextRoot)

private final String name;
private final String contextRoot;
private String host;
private int port;


public void createRegistry(@Observes ArquillianDescriptor event) throws Exception

private Protocol<?> findMatch(ProtocolDescription description, @SuppressWarnings("rawtypes") Collection<Protocol> protocols)

@Inject
private Instance<ServiceLoader> serviceLoader;

@Inject
@ApplicationScoped
private InstanceProducer<ProtocolRegistry> registryInstance;


public void verifyExpectedExceptionDuringDeploy(@Observes EventContext<DeployDeployment> context) throws Exception

private boolean containsType(Throwable exception, Class<? extends Exception> expectedType)

private Throwable transform(Throwable exception)


public Collection<T> all(Class<T> serviceClass)

public T onlyOne(Class<T> serviceClass, Class<? extends T> defaultServiceClass)

private T createServiceInstance(Class<T> service)

private String toClassString(Collection<T> providers)

private Injector injector;
private ServiceRegistry registry;


public void fire(T event, NonManagedObserver<T> nonManagedObserver)

public void bind(Class<? extends Annotation> scope, Class<T> type, T instance)

public T executeInApplicationContext(Callable<T> callable) throws Exception

public void bindAndFire(Class<? extends Annotation> scope, Class<T> type, T instance)

public void fireProcessing() throws Exception

public void addExtension(Class<?> extensionClass) throws Exception

public void removeExtension(Class<?> extensionClass)

private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception

private List<Context> createContexts(Collection<Class<? extends Context>> contextClasses) throws Exception

private void createBuiltInServices() throws Exception

private void addContextsToApplicationScope() throws Exception

private List<ObserverMethod> resolveObservers(Class<?> eventType)

private List<ObserverMethod> resolveInterceptorObservers(Class<?> eventType)

private void inject(Extension extension)

private void injectInstances(Extension extension)

private void injectEvents(Extension extension)

private Context getScopedContext(Class<? extends Annotation> scope)

private final List<Extension> extensions;

/*
     * Hack:
     * Events can be fired nested. If a nested handler throws a exception, the exception is fired on the bus for handling.
     * It is up to the exception handler to re-throw the exception if it can't handle it. When the re-throw happens
     * the higher level event will get the exception and re-fire it on the bus. We need to keep track of which exceptions
     * has been handled in the call chain so we can re-throw without re-firing on a higher level.
     */
private ThreadLocal<Set<Class<? extends Throwable>>> handledThrowables = new ThreadLocal<Set<Class<? extends Throwable>>>() {

    @Override
    protected Set<Class<? extends Throwable>> initialValue() {
        return new HashSet<Class<? extends Throwable>>();
    }
};


public static InstanceImpl<X> of(Class<X> type, Class<? extends Annotation> scope, ManagerImpl manager)

private Class<? extends Annotation> scope;


public static String getFileName(final ConfigurationSourceKey source)

public boolean isAvailable(final ConfigurationSourceKey key)

public long getLastChangeTimestamp(ConfigurationSourceKey key)

public String getContent(final ConfigurationSourceKey key)

private String getContentFromJar(final String fileName) throws IOException

private File getFile(final ConfigurationSourceKey key)

/**
 * Logger.
 */
private static final Logger log = LoggerFactory.getLogger(FileLoader.class);

/**
 * property key for external configuration path (see: {@link #externalConfigPath}).
 */
private static final String EXTERNAL_CONF_PATH = "org.configureme.configuration-path";

/**
 * property value for external configuration path. so you can, for example,
 * setup a system property like
 * 'configureme.configuration-path=[MY_PATH]' to have all
 * configurations somewhere outside of your classpath.
 */
private final String externalConfigPath = System.getProperty(EXTERNAL_CONF_PATH, null);


public void addExternalConfigurations(ConfigurationSourceKey configurationSourceKey)

public Attribute getAttribute(final String attributeName)

public void addAttributeValue(final String attributeName, final Value attributeValue, Environment in)

public Map<Environment, Map<String, Object>> getContent()

/**
 * The name of the configuration and therefore the name of the artefact.
 */
private final String name;

/**
 * The attribute map.
 */
private final Map<String, Attribute> attributes;

/**
 * Content map.
 */
private final Map<Environment, Map<String, Object>> contentMap;

/**
 * External configurations that was included in current configuration
 * this field use for reconfiguration of the current configuration
 */
private final List<ConfigurationSourceKey> externalConfigurations;


public RedGBuilder<T> withDefaultValueStrategy(final DefaultValueStrategy strategy)

public RedGBuilder<T> withPreparedStatementParameterSetter(final PreparedStatementParameterSetter setter)

public RedGBuilder<T> withSqlValuesFormatter(final SQLValuesFormatter formatter)

public RedGBuilder<T> withDummyFactory(final DummyFactory dummyFactory)

private static Logger LOG = LoggerFactory.getLogger(RedGBuilder.class);


public String getClassNameForTable(final Table table)

public String getMethodNameForColumn(final Column column)

public String getMethodNameForForeignKeyColumn(ForeignKey foreignKey, Column primaryKeyColumn, Column foreignKeyColumn)

public String getMethodNameForReference(final ForeignKey foreignKey)

public String getMethodNameForIncomingForeignKey(ForeignKey foreignKey)

public void prependProvider(final NameProvider nameProvider)

public void appendProvider(final NameProvider nameProvider)

private List<NameProvider> providers = new LinkedList<>();

private final NameProvider fallbackProvider = new DefaultNameProvider();


public T copy(F source)
public void copy(F source, T target)

/**
 * 自定义转换器，只有在 useConverter 为 true 时生效
 */
private Converter converter;


public static final String ENVIRONMENT_PROPERTY = "br.com.caelum.vraptor.environment";

public static final String BASE_ENVIRONMENT_FILE = "environment";

public String get(String key, String defaultValue)

public void set(String key, String value)

private void loadAndPut(String environment)

private String findEnvironmentName(final ServletContext context)

private static String fromSystemProperty()

private static final Logger LOG = LoggerFactory.getLogger(DefaultEnvironment.class);


public Object[] deserialize(InputStream inputStream, ControllerMethod method)

public XStream getConfiguredXStream(Method javaMethod, Class<?>[] types)

private static void chooseParam(Class<?>[] types, Object[] params, Object deserialized)

private void aliasParams(Method method, XStream deserializer)

private final ParameterNameProvider provider;