01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.harmony.jndi.internal;
19:
20: /**
21: * Represents the following ASN1 Syntax on java Types:
22: *
23: * <pre>
24: *
25: * realSearchControlValue ::= SEQUENCE {
26: * size INTEGER (0..maxInt),
27: * -- requested page size from client
28: * -- result set size estimate from server
29: * cookie OCTET STRING
30: * }
31: * </pre>
32: */
33: public class PagedResultSearchControlValue {
34:
35: private byte[] cookie;
36:
37: private int size;
38:
39: /**
40: * Constructor
41: *
42: * @param size
43: * an int with the size
44: * @param cookie
45: * the cookie from the server
46: */
47: public PagedResultSearchControlValue(int size, byte[] cookie) {
48: this .cookie = cookie;
49: this .size = size;
50: }
51:
52: /**
53: * Getter method for cookie
54: *
55: * @return the cookie
56: */
57: public byte[] getCookie() {
58: return cookie;
59: }
60:
61: /**
62: * Getter method for size
63: *
64: * @return the size
65: */
66: public int getSize() {
67: return size;
68: }
69:
70: }
|