@ SuppressWarnings ( "PMD.LawOfDemeter" ) public void writeTo ( final OutputStream outputStream ) throws IOException { try ( DataOutputStream dataStream = new DataOutputStream ( outputStream ) ) { dataStream . writeByte ( getVersion ( ) ) ; dataStream . writeLong ( getTimestamp ( ) . getEpochSecond ( ) ) ; dataStream . write ( getInitializationVector ( ) . getIV ( ) ) ; dataStream . write ( getCipherText ( ) ) ; dataStream . write ( getHmac ( ) ) ; } }
Write the raw bytes of this token to the specified output stream .