Examples of IBooleanValue


Examples of com.fineqt.fpb.lib.api.IBooleanValue

                IFactory factory = getPModule().getFactory();
                IContainerValue lengthLine = (IContainerValue)fieldResult.getValue();
                if (lengthLine != null) {
                    ICharstringValue lenValue = (ICharstringValue)lengthLine.getField(
                            HTTP_CHUNK_LENGTH_LINE__CHUNK_LENGTH);
                    IBooleanValue chunked = factory.createBoolean();
                    if (lenValue != null && !lenValue.getText().equals("0")){
                        //hasChunkData
                        chunked.setBoolean(true);
                    } else {
                        //hasChunkData
                        chunked.setBoolean(false);
                    }
                    cxt.getFieldStackMap().setTopField(StackFields.HAS_CHUNK_DATA,
                            chunked);
                }
            }
View Full Code Here

Examples of com.fineqt.fpb.lib.api.IBooleanValue

                String nameText = name.getText();
                //Transfer-Encoding
                if (HeaderNames.TRANSFER_ENCODING.equals(nameText)) {
                    if (HeaderValues.CHUNKED.equals(value.getText())) {
                        //chunked
                        IBooleanValue chunked = factory.createBoolean();
                        chunked.setBoolean(true);
                        fieldStack.setTopField(StackFields.CHUNCKED, chunked);
                        //hasBody
                        IBooleanValue hasBody = factory.createBoolean();
                        hasBody.setBoolean(true);
                        fieldStack.setTopField(StackFields.HAS_BODY, hasBody);
                    }
                //Content-Length
                } else if (HeaderNames.CONTENT_LENGTH.equals(nameText)) {
                    try {
                        int contentLength = Integer.parseInt(value.getText());
                        if (contentLength > 0) {
                            //hasBody
                            IBooleanValue hasBody = factory.createBoolean();
                            hasBody.setBoolean(true);
                            fieldStack.setTopField(StackFields.HAS_BODY, hasBody);
                            //contentLength
                            IIntegerValue lenValue = factory.createInteger();
                            lenValue.setInteger(contentLength);
                            fieldStack.setTopField(StackFields.CONTENT_LENGTH, lenValue);
                        }
                    } catch (NumberFormatException e) {
                        //忽略错误长度
                    }
                //Trailer
                } else if (HeaderNames.TRAILER.equals(nameText)) {
                    String[] names = SPACE_DELIMITER.split(value.getText());
                    Set<String> nameSet = new TreeSet<String>();
                    for (int i = 0; i < names.length; i++) {
                        String trailerName = names[i].trim();
                        if (trailerName.length() > 0) {
                            nameSet.add(trailerName);
                        }
                    }
                    if (nameSet.size() > 0) {
                        //hasTrailers
                        IBooleanValue hasTrailers = factory.createBoolean();
                        hasTrailers.setBoolean(true);
                        fieldStack.setTopField(StackFields.HAS_TRAILERS, hasTrailers);
                        //trailerNames
                        fieldStack.setTopField(StackFields.TRAILER_NAMES, nameSet);
                    }
                }
View Full Code Here

Examples of com.fineqt.fpb.lib.api.IBooleanValue

            boolean ret = super.postDecodeItem(cxt, input, paras, parentResult,
                    itemResult, itemMeta);
            if (!ret) {
                return ret;
            }
            IBooleanValue hasValue = (IBooleanValue)cxt.getFieldStackMap().peekField(
                    StackFields.HAS_CHUNK_DATA);
            if (hasValue == null || !hasValue.getBoolean()) {
                return false;
            }
            return true;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.