java_loxi: big refactoring and clean-up
diff --git a/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java b/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java
index e8eeebd..dab6ff2 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/util/ChannelUtils.java
@@ -3,17 +3,32 @@
 import java.util.List;
 
 import org.jboss.netty.buffer.ChannelBuffer;
-import org.openflow.protocol.actions.OFAction;
-import org.openflow.protocol.instructions.OFInstruction;
+import org.openflow.protocol.OFBsnInterface;
+import org.openflow.protocol.OFBsnVportQInQ;
+import org.openflow.protocol.OFBsnVportQInQT;
+import org.openflow.protocol.OFBucket;
+import org.openflow.protocol.OFFlowStatsEntry;
+import org.openflow.protocol.OFGroupDescStatsEntry;
+import org.openflow.protocol.OFGroupStatsEntry;
+import org.openflow.protocol.OFHelloElem;
+import org.openflow.protocol.OFMeterFeatures;
+import org.openflow.protocol.OFMeterStats;
+import org.openflow.protocol.OFPacketQueue;
+import org.openflow.protocol.OFPortStatsEntry;
+import org.openflow.protocol.OFQueueStatsEntry;
+import org.openflow.protocol.OFTableFeature;
+import org.openflow.protocol.OFTableFeatures;
+import org.openflow.protocol.OFTableStatsEntry;
+import org.openflow.protocol.action.OFAction;
+import org.openflow.protocol.instruction.OFInstruction;
 import org.openflow.protocol.match.Match;
-import org.openflow.types.OFBsnInterface;
-import org.openflow.types.OFBucket;
 import org.openflow.types.OFFlowModCmd;
 import org.openflow.types.OFHelloElement;
 import org.openflow.types.OFMeterBand;
-import org.openflow.types.OFPacketQueue;
 import org.openflow.types.OFPhysicalPort;
 
+import com.google.common.base.Charsets;
+
 /**
  * Collection of helper functions for reading and writing into ChannelBuffers
  *
@@ -90,4 +105,212 @@
         return null;
     }
 
+    public static void writeOFMatch(ChannelBuffer bb, Match match) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeList(ChannelBuffer bb, List<?> ports) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeOFFlowModCmd(ChannelBuffer bb, OFFlowModCmd command) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static String readFixedLengthString(ChannelBuffer bb, int length) {
+        byte[] dst = new byte[length];
+        bb.readBytes(dst, 0, length);
+        return new String(dst, Charsets.US_ASCII);
+    }
+
+    public static void writeFixedLengthString(ChannelBuffer bb, String string, int length) {
+        int l = string.length();
+        if(l > length) {
+            throw new IllegalArgumentException("Error writing string: length="+l+" > max Length="+length);
+        }
+        bb.writeBytes(string.getBytes(Charsets.US_ASCII));
+        if(l < length) {
+            bb.writeZero(length - l);
+        }
+    }
+
+    public static void writeBsnInterfaceList(ChannelBuffer bb, List<OFBsnInterface> interfaces) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeTableFeatureList(ChannelBuffer bb,
+            List<OFTableFeature> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeBsnInterface(ChannelBuffer bb,
+            List<OFBsnInterface> interfaces) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeFlowStatsEntry(ChannelBuffer bb,
+            List<OFFlowStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFFlowStatsEntry> readFlowStatsEntry(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeTableStatsEntryList(ChannelBuffer bb,
+            List<OFTableStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFTableStatsEntry> readTableStatsEntryList(
+            ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static List<OFFlowStatsEntry> readFlowStatsEntryList(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeFlowStatsEntryList(ChannelBuffer bb,
+            List<OFFlowStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeGroupDescStatsEntryList(ChannelBuffer bb,
+            List<OFGroupDescStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFGroupDescStatsEntry> readGroupDescStatsEntryList(
+            ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeOFBsnVportQInQT(ChannelBuffer bb,
+            OFBsnVportQInQT vport) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void writeMeterBandList(ChannelBuffer bb,
+            List<OFMeterBand> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static int writeActionsList(ChannelBuffer bb, List<OFAction> actions) {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public static OFBsnVportQInQ readOFBsnVportQInQ(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writePortStatsEntryList(ChannelBuffer bb,
+            List<OFPortStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static void write(ChannelBuffer bb, OFPhysicalPort desc) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFPortStatsEntry> readPortStatsEntryList(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeOFBsnVportQInQ(ChannelBuffer bb,
+            OFBsnVportQInQ vport) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFHelloElem> readHelloElemList(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeHelloElemList(ChannelBuffer bb,
+            List<OFHelloElem> elements) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFGroupStatsEntry> readGroupStatsEntryList(
+            ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeGroupStatsEntryList(ChannelBuffer bb,
+            List<OFGroupStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFQueueStatsEntry> readQueueStatsEntryList(
+            ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeQueueStatsEntryList(ChannelBuffer bb,
+            List<OFQueueStatsEntry> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static OFMeterFeatures readOFMeterFeatures(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeOFMeterFeatures(ChannelBuffer bb,
+            OFMeterFeatures features) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFMeterStats> readMeterStatsList(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeMeterStatsList(ChannelBuffer bb,
+            List<OFMeterStats> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+    public static List<OFTableFeatures> readTableFeaturesList(ChannelBuffer bb) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public static void writeTableFeaturesList(ChannelBuffer bb,
+            List<OFTableFeatures> entries) {
+        // TODO Auto-generated method stub
+
+    }
+
+
 }