com.webfirmframework.wffweb.util.WffBinaryMessageUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wffweb Show documentation
Show all versions of wffweb Show documentation
A java framework to develop web applications
/*
* Copyright 2014-2017 Web Firm Framework
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webfirmframework.wffweb.util;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import com.webfirmframework.wffweb.util.data.NameValue;
public enum WffBinaryMessageUtil {
/**
* A wff binary message is a collection of name-value pairs where both name
* and value can be a binary data. It can have duplicate names.
*
* The wff binary message is composed as follows :-
* The first byte represents the maximum number of bytes for name length
* bytes. The second byte represents the maximum number of bytes for the
* values length bytes. The remaining bytes represent the name-values pairs.
*
*
* Name values pair :-
*
*
*
* name length bytes
* name bytes
* values length bytes
* values bytes
*
*
*
*
*
* Here, the name length bytes is the length of name bytes and values length
* bytes is the length of values bytes.* * The values in name-values pair is an array of value, the values is * composed as follows * *
* Value as an array :- *
total values length bytes | *value length bytes | *value bytes | *value length bytes | *value bytes | *
© 2015 - 2025 Weber Informatics LLC | Privacy Policy