default byte[] writeAsBytes(Array array){
  try (ByteArrayOutputStream stream=new ByteArrayOutputStream()){
    write(array,stream);
    return stream.toByteArray();
  }
 catch (  IOException e) {
    e.printStackTrace();
    return new byte[]{};
  }
}

default byte [ ] writeAsBytes ( Array array ) { try ( ByteArrayOutputStream stream = new ByteArrayOutputStream ( ) ) { write ( array , stream ) ; return stream . toByteArray ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return new byte [ ] { } ; } }
write the supplied array to bytes using utf - 8 .
