Examples of MediaContent


Examples of com.google.gdata.data.MediaContent

              textContent.getContent().getPlainText() +
              "</body></html>"));
     
    } else if (content instanceof MediaContent) {
     
      MediaContent mediaContent = (MediaContent) content;
      map.put(SpiConstants.PROPNAME_MIMETYPE,
          makeProperty(mediaContent.getMimeType().getMediaType() ));
      map.put(SpiConstants.PROPNAME_CONTENT,
          makeProperty(mediaContent.getMediaSource()));
     
    } else if (content instanceof OtherContent) {
     
      OtherContent otherContent = (OtherContent) content;
      map.put(SpiConstants.PROPNAME_MIMETYPE,
View Full Code Here

Examples of com.google.gdata.data.MediaContent

    public InputStream downloadFile(String exportUrl) throws IOException, MalformedURLException, ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Retrieving content for document from: " + exportUrl);

        MediaContent mc = new MediaContent();
        mc.setUri(exportUrl);
        MediaSource ms = service.getMedia(mc);

        InputStream inStream = ms.getInputStream();

        watch.stop();
View Full Code Here

Examples of com.google.gdata.data.MediaContent

            ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Exporting document from: " + exportUrl);

        MediaContent mc = new MediaContent();
        mc.setUri(exportUrl);
        MediaSource ms = service.getMedia(mc);

        InputStream inStream = null;

        try {
View Full Code Here

Examples of com.google.gdata.data.MediaContent

        logger.info("Uploading content for: " + documentTitle);

        DocumentListEntry newDocument = new DocumentListEntry();
        newDocument.setTitle(new PlainTextConstruct(documentTitle));

        MediaContent content = new MediaContent();
        content.setMediaSource(new MediaStreamSource(fileStream, mimeType));
        content.setMimeType(new ContentType(mimeType));
        newDocument.setContent(content);

        DocumentListEntry uploadedFile = service.insert(targetFolderUri, newDocument);

        watch.stop();
View Full Code Here

Examples of com.google.gdata.data.MediaContent

  /**
   * Associate a File with this entry with the specified mime type
   */
  public void setFile(File file, String mimeType) {
    MediaFileSource fileSource = new MediaFileSource(file, mimeType);
    MediaContent content = new MediaContent();
    content.setMediaSource(fileSource);
    content.setMimeType(new ContentType(mimeType));
    setContent(content);
  }
View Full Code Here

Examples of com.sun.syndication.feed.module.mediarss.types.MediaContent

        //The first argument is a string representing the URI of the media
        if (args[0] instanceof String) {
            MediaEntryModuleImpl newModule = new MediaEntryModuleImpl();
            MediaContent[] newContents = new MediaContent[1];
            MediaContent newMediaItem = null;
            try {
                newMediaItem = new MediaContent(new UrlReference((String) args[0]));
            } catch (URISyntaxException e) {
                throw new CarbonException(e.getMessage());
            }
            newContents[0] = newMediaItem;
            Metadata newMetaData = new Metadata();
            newMediaItem.setMetadata(newMetaData);
            newModule.setMediaContents(newContents);

            newMediaModule = new MediaModule();
            newMediaModule.module = newModule;
        } else {
View Full Code Here

Examples of data.media.MediaContent

    public static void main(String[] args) throws Exception {
        System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
        List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
        System.out.println(arguments);

        MediaContent content = EishayDecodeBytes.instance.getContent();
        String text = encode(content);
        System.out.println(text);
       
        for (int i = 0; i < 10; ++i) {
            perf(text);
View Full Code Here

Examples of data.media.MediaContent

        //JavaBeanMapping.getGlobalInstance().putDeserializer(Media.class, new MediaDeserializer());
    }

    @Override
    public void execute(Codec codec) throws Exception {
        MediaContent content = codec.decodeObject(text, MediaContent.class);
        if (content == null) {
            throw new Exception();
        }
    }
View Full Code Here

Examples of data.media.MediaContent

        // JavaBeanMapping.getGlobalInstance().putDeserializer(Media.class, new MediaDeserializer());
    }

    @Override
    public void execute(Codec codec) throws Exception {
        MediaContent content = codec.decodeObject(text, MediaContent.class);
        if (content == null) {
            throw new Exception();
        }
    }
View Full Code Here

Examples of data.media.MediaContent

    }

    public EishayDecodeBytes(){
        super("EishayDecode-Byte[]");

        content = new MediaContent();

        Media media = new Media();
        media.uri = "http://javaone.com/keynote.mpg";
        media.title = "Javaone Keynote";
        media.width = 640;
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.