public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { return (String) key; } ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new OOS(bos, oscSerializer); writeStringKey(key, oos); oos.close(); return bos.toString(0x00); }
public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { return (String) key; } ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new OOS(bos, oscSerializer); writeStringKey(key, oos); oos.close(); return bos.toString(0x00); }
public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { return (String) key; } ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new OOS(bos, oscSerializer); writeStringKey(key, oos); oos.close(); return bos.toString(0x00); }
@Override public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { String stringKey = (String) key; // disallow Strings that start with our marker if (stringKey.length() >= 1) { if (stringKey.charAt(0) == MARKER) { // throw new IOException("Illegal string key: " + stringKey); } } return stringKey; } StringSerializedObjectOutputStream out = new StringSerializedObjectOutputStream(); ObjectOutputStream oos = new OOS(out, oscSerializer); writeStringKey(key, oos); oos.close(); return out.toString(); }
@Override public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { String stringKey = (String) key; // disallow Strings that start with our marker if (stringKey.length() >= 1) { if (stringKey.charAt(0) == MARKER) { // throw new IOException("Illegal string key: " + stringKey); } } return stringKey; } StringSerializedObjectOutputStream out = new StringSerializedObjectOutputStream(); ObjectOutputStream oos = new OOS(out, oscSerializer); writeStringKey(key, oos); oos.close(); return out.toString(); }
@Override public byte[] serialize(final AbstractElementData element) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); element.write(oos); oos.close(); return baos.toByteArray(); } }
@Override public byte[] serialize(final AbstractElementData element) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); element.write(oos); oos.close(); return baos.toByteArray(); } }
public String generateStringKeyFor(final Object key) throws IOException { if (key instanceof String) { return (String) key; } ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new OOS(bos, oscSerializer); writeStringKey(key, oos); oos.close(); return bos.toString(0x00); }
public byte[] serialize(final T value) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); oos.writeObject(value); oos.close(); return baos.toByteArray(); }
public byte[] serialize(final T value) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); oos.writeObject(value); oos.close(); return baos.toByteArray(); }
public byte[] serialize(final T value) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); oos.writeObject(value); oos.close(); return baos.toByteArray(); }
public byte[] serialize(final T value) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OOS oos = new OOS(baos, oscSerializer); oos.writeObject(value); oos.close(); return baos.toByteArray(); }