2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.protocol.pcep.impl.subobject;
10 import org.opendaylight.protocol.pcep.PCEPDeserializerException;
11 import org.opendaylight.protocol.pcep.spi.EROSubobjectParser;
12 import org.opendaylight.protocol.pcep.spi.EROSubobjectSerializer;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Subobjects;
15 public class EROExplicitExclusionRouteSubobjectParser implements EROSubobjectParser, EROSubobjectSerializer {
17 public static final int TYPE = 33;
20 public Subobjects parseSubobject(final byte[] buffer, final boolean loose) throws PCEPDeserializerException {
21 if (buffer == null || buffer.length == 0)
22 throw new IllegalArgumentException("Array of bytes is mandatory. Can't be null or empty.");
24 // return new EROExplicitExclusionRouteSubobject(PCEPXROSubobjectParser.parse(cutBytes));
29 public byte[] serializeSubobject(final Subobjects subobject) {
30 // return PCEPXROSubobjectParser.put(subobject.getXroSubobjets());
35 public int getType() {