Examples of FileDataSource


Examples of javax.activation.FileDataSource

        OMNamespace ns = factory.createOMNamespace("http://services.samples", "m0");
        OMElement payload  = factory.createOMElement("uploadFileUsingSwAResponse", ns);
        OMElement response = factory.createOMElement("response", ns);
        OMElement imageId  = factory.createOMElement("imageId", ns);

        FileDataSource fileDataSource = new FileDataSource(tempFile);
        dataHandler = new DataHandler(fileDataSource);
        imageContentId = outMsgCtx.addAttachment(dataHandler);
        imageId.setText(imageContentId);
        response.addChild(imageId);
        payload.addChild(response);
View Full Code Here

Examples of javax.activation.FileDataSource

        OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP);

        MessageContext mc = new MessageContext();

        System.out.println("Sending file : " + fileName + " as SwA");
        FileDataSource fileDataSource = new FileDataSource(new File(fileName));
        DataHandler dataHandler = new DataHandler(fileDataSource);
        String attachmentID = mc.addAttachment(dataHandler);


        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
View Full Code Here

Examples of net.sourceforge.pmd.util.datasource.FileDataSource

        pmdConfiguration.setSourceEncoding( encoding );

        List<DataSource> dataSources = new ArrayList<DataSource>( filesToProcess.size() );
        for ( File f : filesToProcess.keySet() )
        {
            dataSources.add( new FileDataSource( f ) );
        }

        try
        {
            getLog().debug( "Executing PMD..." );
View Full Code Here

Examples of nz.govt.natlib.fx.FileDataSource

  public void adapt(File file, ParserContext ctx) throws IOException {
    // add the MetaData to the tree!
    DataSource ftk = null;
   
    try {
      ftk = new FileDataSource(file);
     
      ctx.fireStartParseEvent("WAV");
      writeFileInfo(file, ctx);
 
      ctx.fireStartParseEvent("RIFF");
View Full Code Here

Examples of org.apache.flink.api.java.record.operators.FileDataSource

  @SuppressWarnings("unchecked")
  @Test
  public void testUnionPropertyOldApiPropagation() {
    // construct the plan

    FileDataSource sourceA = new FileDataSource(new DummyInputFormat(), IN_FILE);
    FileDataSource sourceB = new FileDataSource(new DummyInputFormat(), IN_FILE);
   
    ReduceOperator redA = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0)
      .input(sourceA)
      .build();
    ReduceOperator redB = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0)
View Full Code Here

Examples of org.ebml.io.FileDataSource

    @Override
  protected void process(RandomAccessFile raf, String filename) throws Exception {
        raf.seek(0);
       
        FileDataSource fds = new FileDataSource(filename);
       
        try {
            MatroskaFile mkf = new MatroskaFile(fds);
        mkf.readFile();
   
        double duration = mkf.getDuration();
        duration = duration > 0 ? duration / 1000 : duration;
        setDuration((int) duration);
       
        if (mkf.getTrackList() != null) {
           
            for (MatroskaFileTrack track : mkf.getTrackList()) {
                if (track.TrackType ==  MatroskaDocType.track_video) {
                    setVideoResolution(track.Video_PixelWidth + "x" + track.Video_PixelHeight);
                    setVideoCodec(track.CodecID);
                    setName(track.Name);
                   
                    if (track.Language != null) {
                        String language = Utilities.getLanguage(track.Language);
                        language = language == null || language.length() == 0 ? track.Language : language;
                        setLanguage(language);
                    }
                } else if (track.TrackType ==  MatroskaDocType.track_subtitle) {
                    String subtitles = getSubtitles();
                    subtitles += subtitles.length() > 0 ? ", " : "";
                   
                        String language = Utilities.getLanguage(track.Name);
                        language = language == null || language.length() == 0 ? track.Name : track.Name;
                    subtitles += language;
                    setSubtitles(subtitles);
                   
                } else if (track.TrackType ==  MatroskaDocType.track_audio) {
                    setAudioChannels(track.Audio_Channels);
                    setAudioCodec(track.CodecID);
                }
            }
        }

        setContainer("MKV (Matroska)");

        } catch (Exception e) {
            logger.error("Failed to parse MKV file " + filename, e);
        } finally {
            fds.close();
        }
  }
View Full Code Here

Examples of primarydatamanager.mirrorupdater.data.FileDataSource

      if (type.equals("http")) {
        String url = getProperty(prop, "dataSource.url", getPrimaryServerUrl());
        mDataSource = new HttpDataSource(url);
      } else if (type.equals("file")) {
        String dir = getProperty(prop, "dataSource.dir");
        mDataSource = new FileDataSource(new File(dir));
      } else {
        throw new UpdateException("dataSource.type must be either 'http' or 'file'");
      }
    }
    catch (Exception exc) {
View Full Code Here

Examples of uk.org.whoami.authme.datasource.FileDataSource

        m = Messages.getInstance();

        switch (settings.getDataSource()) {
            case FILE:
                try {
                    database = new FileDataSource();
                } catch (IOException ex) {
                    ConsoleLogger.showError(ex.getMessage());
                    this.getServer().getPluginManager().disablePlugin(this);
                    return;
                }
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.