public int serialize ( OutputStream os ) throws IOException { DataOutputStream dos = new DataOutputStream ( os ) ; int bytesWritten = 0 ; bytesWritten += serializeHeader ( dos ) ; for ( int i = 0 ; i < dataLength ; i ++ ) { dos . writeChar ( index [ data16 + i ] ) ; } bytesWritten += dataLength * 2 ; return bytesWritten ; }
Serialize a Trie2_16 onto an OutputStream .