Package se.despotify.domain.media

Examples of se.despotify.domain.media.PlaylistContainer.calculateChecksum()


            new Date().getTime() / 1000,
            user.getName(),
            // version
            playlists.getRevision() + 1,         // new revision of user playlists
            playlists.getItems().size(),         // new size of user playlists
            playlists.calculateChecksum(),       // new checksum of user playlists
            playlist.isCollaborative() ? 1 : 0
        );

    byte[] xmlBytes = xml.getBytes();
    ByteBuffer buffer = ByteBuffer.allocate(2 + 16 + 1 + 4 + 4 + 4 + 1 + 1 + xmlBytes.length);
View Full Code Here


    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

            new Date().getTime() / 1000,
            user.getId(),
            // version
            playlists.getRevision() + 1,         // new revision of user playlists
            playlists.getItems().size(),         // new size of user playlists
            playlists.calculateChecksum(),       // new checksum of user playlists
            playlist.isCollaborative() ? 1 : 0
        );

    byte[] xmlBytes = xml.getBytes();
    ByteBuffer buffer = ByteBuffer.allocate(2 + 16 + 1 + 4 + 4 + 4 + 1 + 1 + xmlBytes.length);
View Full Code Here

    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

            new Date().getTime() / 1000,
            user.getId(),
            // version
            playlists.getRevision() + 1,         // new revision of user playlists
            playlists.getItems().size(),         // new size of user playlists
            playlists.calculateChecksum(),       // new checksum of user playlists
            playlist.isCollaborative() ? 1 : 0
        );

    byte[] xmlBytes = xml.getBytes();
    ByteBuffer buffer = ByteBuffer.allocate(2 + 16 + 1 + 4 + 4 + 4 + 1 + 1 + xmlBytes.length);
View Full Code Here

    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

    if (playlists.getItems().size() != Long.parseLong(versionTagValues[1])) {
      throw new RuntimeException("Size missmatch");
    }

    if (playlists.calculateChecksum() != playlists.getChecksum()) {
      throw new ChecksumException(playlists.calculateChecksum(), playlists.getChecksum());
    }
    if (playlist.isCollaborative() != (Integer.parseInt(versionTagValues[3]) == 1)) {
      throw new RuntimeException("Collaborative flag missmatch");
    }
View Full Code Here

            new Date().getTime() / 1000,
            user.getId(),
            // version
            playlists.getRevision() + 1,         // new revision of user playlists
            playlists.getItems().size(),         // new size of user playlists
            playlists.calculateChecksum(),       // new checksum of user playlists
            playlist.isCollaborative() ? 1 : 0
        );

    byte[] xmlBytes = xml.getBytes();
    ByteBuffer buffer = ByteBuffer.allocate(2 + 16 + 1 + 4 + 4 + 4 + 1 + 1 + xmlBytes.length);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.