@Override public void endMap(String tag) throws IOException { endVector(tag); }
@Override public void startRecord(String tag) throws IOException { Value v = next(); if (!"struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
@Override public Index startMap(String tag) throws IOException { return startVector(tag); }
XmlRecordInput rin = new XmlRecordInput(bin); for(int idx = 0; idx < numRecords; idx++) { records[idx].deserialize(rin);
public void testXml() { File tmpfile; try { tmpfile = new File("/temp/hadooptmp.xml"); RecRecord1 r1 = new RecRecord1(); r1.setBoolVal(true); r1.setByteVal((byte)0x66); r1.setFloatVal(3.145F); r1.setDoubleVal(1.5234); r1.setIntVal(4567); r1.setLongVal(0x5a5a5a5a5a5aL); r1.setStringVal("random text"); r1.setBufferVal(new Buffer()); r1.setVectorVal(new ArrayList<String>()); r1.setMapVal(new TreeMap<String,String>()); FileInputStream istream = new FileInputStream(tmpfile); XmlRecordInput in = new XmlRecordInput(istream); RecRecord1 r2 = new RecRecord1(); r2.deserialize(in, ""); istream.close(); assertTrue(r1.equals(r2)); } catch (IOException ex) { ex.printStackTrace(); } }
public void endRecord(String tag) throws IOException { Value v = next(); if (!"/struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
@Override public Index startMap(String tag) throws IOException { return startVector(tag); }
@Override public void endMap(String tag) throws IOException { endVector(tag); }
ostream.close(); FileInputStream istream = new FileInputStream(tmpfile); XmlRecordInput in = new XmlRecordInput(istream); RecRecord1 r2 = new RecRecord1(); r2.deserialize(in, "");
@Override public void startRecord(String tag) throws IOException { Value v = next(); if (!"struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
@Override public Index startMap(String tag) throws IOException { return startVector(tag); }
@Override public void endMap(String tag) throws IOException { endVector(tag); }
public void startRecord(String tag) throws IOException { Value v = next(); if (!"struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
@Override public Index startMap(String tag) throws IOException { return startVector(tag); }
@Override public void endMap(String tag) throws IOException { endVector(tag); }
public void startRecord(String tag) throws IOException { Value v = next(); if (!"struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
public Index startMap(String tag) throws IOException { return startVector(tag); }
public void endMap(String tag) throws IOException { endVector(tag); }
@Override public void endRecord(String tag) throws IOException { Value v = next(); if (!"/struct".equals(v.getType())) { throw new IOException("Error deserializing "+tag+"."); } }
public Index startMap(String tag) throws IOException { return startVector(tag); }