1 /*
2 * Copyright 2024–2026 Michael Osipov
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package net.sf.michaelo.tomcat.pac;
17
18 import java.math.BigInteger;
19
20 /**
21 * A class representing the <a href=
22 * "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-pac/3341cfa2-6ef5-42e0-b7bc-4544884bf399">{@code PAC_INFO_BUFFER}</a>
23 * structure from MS-PAC.
24 */
25 public class PacInfoBuffer {
26
27 private final long type;
28 private final long bufferSize;
29 private final BigInteger offset;
30 private final byte[] data;
31
32 /** Constructs a PAC info buffer. */
33 public PacInfoBuffer(long type, long bufferSize, BigInteger offset, byte[] data) {
34 this.type = type;
35 this.bufferSize = bufferSize;
36 this.offset = offset;
37 this.data = data;
38 }
39
40 public long getType() {
41 return type;
42 }
43
44 public long getBufferSize() {
45 return bufferSize;
46 }
47
48 public BigInteger getOffset() {
49 return offset;
50 }
51
52 public byte[] getData() {
53 return data;
54 }
55 }