final ByteArrayOutputStream os = new ByteArrayOutputStream();
final BufferedOutputStream bos = new BufferedOutputStream(os);
byte[] array = null;
try {
final LuposObjectOutputStream loos = new LuposObjectOutputStream(bos);
loos.writeLuposObject(element);
loos.flush();
loos.close();
os.close();
bos.close();
array = os.toByteArray();
} catch (final IOException e) {
e.printStackTrace();