X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pcep%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fpcep%2Fimpl%2Fobject%2FXROSubobjectUtil.java;fp=pcep%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fpcep%2Fimpl%2Fobject%2FXROSubobjectUtil.java;h=0000000000000000000000000000000000000000;hb=02b812aaa9f43565fb27bd261263fbe10426f080;hp=4a8b6cb3e30f0f171159318645a1c7258b99ed8a;hpb=2bf7a2817fc4954542c374b78e172716fa1317ac;p=bgpcep.git diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/XROSubobjectUtil.java b/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/XROSubobjectUtil.java deleted file mode 100644 index 4a8b6cb3e3..0000000000 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/XROSubobjectUtil.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.protocol.pcep.impl.object; - -import com.google.common.primitives.UnsignedBytes; - -public final class XROSubobjectUtil { - - private static final int HEADER_SIZE = 2; - - private XROSubobjectUtil() { - } - - public static byte[] formatSubobject(final int type, final boolean mandatory, final byte[] value) { - final byte[] bytes = new byte[HEADER_SIZE + value.length]; - bytes[0] = (byte) (UnsignedBytes.checkedCast(type) | (mandatory ? 1 << 7 : 0)); - bytes[1] = UnsignedBytes.checkedCast(value.length + HEADER_SIZE); - System.arraycopy(value, 0, bytes, HEADER_SIZE, value.length); - return bytes; - } -}