Package se.despotify.client.protocol

Examples of se.despotify.client.protocol.ResponseUnmarshaller.skip()


//    System.out.println(new String(GZIP.inflate(data), UTF8));

    try {
      XMLStreamReader xmlr = ResponseUnmarshaller.createReader(new InputStreamReader(new GZIPInputStream(new ByteArrayInputStream(data)), Charset.forName("UTF-8")));
      ResponseUnmarshaller responseUnmarshaller = new ResponseUnmarshaller(store, xmlr);
      responseUnmarshaller.skip();
      if (!"result".equals(xmlr.getLocalName())) {
        throw new DespotifyException("Expected document root to be of type <result>");
      }

      Result result = responseUnmarshaller.unmarshallSearchResult();
View Full Code Here


//      timeUnmarshall.start();

      Reader reader = new InputStreamReader(new GZIPInputStream(new ByteArrayInputStream(compressedData)), UTF8);
      XMLStreamReader xmlr = ResponseUnmarshaller.createReader(reader);
      ResponseUnmarshaller unmarshaller = new ResponseUnmarshaller(store, xmlr);
      unmarshaller.skip();
      List<Track> tracks = unmarshaller.unmarshallLoadTracks();
      xmlr.close();
      for (Track track : tracks) {
        store.persist(track);
      }
View Full Code Here

//      timeUnmarshall.start();

      try {
        XMLStreamReader xmlr = ResponseUnmarshaller.createReader(new InputStreamReader(new GZIPInputStream(new ByteArrayInputStream(data)), Charset.forName("UTF-8")));
        ResponseUnmarshaller responseUnmarshaller = new ResponseUnmarshaller(store, xmlr);
        responseUnmarshaller.skip();
        if (!"artist".equals(xmlr.getLocalName())) {
          throw new DespotifyException("Expected document root to be of type <artist>");
        }

        artist = responseUnmarshaller.unmarshallArtist(new Date());
View Full Code Here

//    }

    try {
      XMLStreamReader xmlr = ResponseUnmarshaller.createReader(new InputStreamReader(new ByteArrayInputStream(data), Charset.forName("UTF-8")));
      ResponseUnmarshaller responseUnmarshaller = new ResponseUnmarshaller(store, xmlr);
      responseUnmarshaller.skip();
      if (!"album".equals(xmlr.getLocalName())) {
        throw new DespotifyException("Expected document root to be of type <album>");
      }
      album = responseUnmarshaller.unmarshallAlbum(new Date());
      xmlr.close();
View Full Code Here


      try {
        XMLStreamReader xmlr = ResponseUnmarshaller.createReader(new InputStreamReader(new ByteArrayInputStream(data), Charset.forName("UTF-8")));
        ResponseUnmarshaller responseUnmarshaller = new ResponseUnmarshaller(store, xmlr);
        responseUnmarshaller.skip();
        if (!"artist".equals(xmlr.getLocalName())) {
          throw new DespotifyException("Expected document root to be of type <artist>");
        }
        Artist artist = responseUnmarshaller.unmarshallArtist(new Date());
        if (!this.artist.equals(artist)) {
View Full Code Here

//    }

    try {
      XMLStreamReader xmlr = ResponseUnmarshaller.createReader(new InputStreamReader(new ByteArrayInputStream(data), Charset.forName("UTF-8")));
      ResponseUnmarshaller responseUnmarshaller = new ResponseUnmarshaller(store, xmlr);
      responseUnmarshaller.skip();
      if (!"album".equals(xmlr.getLocalName())) {
        throw new DespotifyException("Expected document root to be of type <album>");
      }
      album = responseUnmarshaller.unmarshallAlbum(new Date());
    } catch (XMLStreamException e) {
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.