Examples of MediaContent


Examples of serializers.thrift.MediaContent

    public MediaContent deserialize(byte[] array) throws Exception
  {
    ByteArrayInputStream bais = new ByteArrayInputStream(array);
    TIOStreamTransport trans = new TIOStreamTransport(bais);
    TBinaryProtocol oprot = new TBinaryProtocol(trans);
    MediaContent content = new MediaContent();
    content.read(oprot);
    return content;
  }
View Full Code Here

Examples of serializers.thrift.MediaContent

    media.setPlayer(Player.JAVA);

    Image image1 = new Image("http://javaone.com/keynote_large.jpg", "Javaone Keynote", 0, 0, Size.LARGE);
    Image image2 = new Image("http://javaone.com/keynote_thumbnail.jpg", "Javaone Keynote", 0, 0, Size.SMALL);

    MediaContent content = new MediaContent();
    content.setMedia(media);
    content.addToImage(image1);
    content.addToImage(image2);
    return content;
  }
View Full Code Here

Examples of test.utils.json.github.MediaContent

    Assert.assertThat(o2.getList().get(1).get(1).getId(), is(1001));
  }
 
  @Test
  public void test6() {
     MediaContent record = MediaContent.createRecord();
     String json = Json.toJson(record);
      
       MediaContent r = Json.toObject(json, MediaContent.class);
       Assert.assertThat(r.getMedia().getPlayer(), is(Player.JAVA));
       Assert.assertThat(r.getImages().size(), is(2));
       Assert.assertThat(r.getImages().get(0).getSize(), is(Size.LARGE));
       Assert.assertThat(r.getImages().get(0).getHeight(), is(768));
  }
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.