示例#1
0
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: @Override public void encodeTrack(MessageOutput stream, AudioTrack track) throws IOException
        public override void encodeTrack(MessageOutput stream, AudioTrack track)
        {
            DataOutput output = stream.startMessage();

            output.write(TRACK_INFO_VERSION);

            AudioTrackInfo trackInfo = track.Info;

            output.writeUTF(trackInfo.title);
            output.writeUTF(trackInfo.author);
            output.writeLong(trackInfo.length);
            output.writeUTF(trackInfo.identifier);
            output.writeBoolean(trackInfo.isStream);
            DataFormatTools.writeNullableText(output, trackInfo.uri);

            encodeTrackDetails(track, output);
            output.writeLong(track.Position);

            stream.commitMessage(TRACK_INFO_VERSIONED);
        }