Examples of writeTo()


Examples of org.apache.synapse.commons.util.TemporaryData.writeTo()

    private void writeMessageFromTempData(OutputStream out, MessageContext msgContext)
            throws IOException {
        TemporaryData serialized =
                (TemporaryData) msgContext.getProperty(NhttpConstants.SERIALIZED_BYTES);
        try {
            serialized.writeTo(out);
        } finally {
            serialized.release();
        }
    }
View Full Code Here

Examples of org.apache.tez.dag.api.records.DAGProtos.ConfigurationProto.writeTo()

      kvp.setKey(entry.getKey());
      kvp.setValue(entry.getValue());
      confProtoBuilder.addConfKeyValues(kvp);
    }
    ConfigurationProto confProto = confProtoBuilder.build();
    confProto.writeTo(dos);
  }

  private static void readConfFromPB(ConfigurationProto confProto, Configuration conf) {
    List<PlanKeyValuePair> settingList = confProto.getConfKeyValuesList();
    for (PlanKeyValuePair setting : settingList) {
View Full Code Here

Examples of org.apache.tez.dag.api.records.DAGProtos.DAGPlan.writeTo()

      FSDataOutputStream dagPBOutBinaryStream = null;

      try {
        //binary output
        dagPBOutBinaryStream = TezCommonUtils.createFileForAM(fs, binaryPath);
        dagPB.writeTo(dagPBOutBinaryStream);
      } finally {
        if(dagPBOutBinaryStream != null){
          dagPBOutBinaryStream.close();
        }
      }
View Full Code Here

Examples of org.apache.trevni.avro.AvroColumnWriter.writeTo()

    for (GenericRecord record : genericRecords) {
      writer.write(record);
    }

    writer.writeTo(avroFile);
  }

  @Test
  public void testSpecific() throws IOException {
    GenericRecord savedRecord = new Record(Person.SCHEMA$);
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUpload.writeTo()

                                String fileName = upload.getClientFileName();
                                String fileType = fileExt(upload.getClientFileName());
                                cleanUserFolder(userName);
                                String usrFolder = getTempFolder(userName);
                                String destPath = node.getNodePath();
                                upload.writeTo(new File(usrFolder
                                        + pathSeparator
                                        + upload.getClientFileName()));
                                // File writed in temp folder
                                if (fileType != null && !fileType.equals("")
                                        && fileName != null
View Full Code Here

Examples of org.apache.wicket.protocol.http.BufferedWebResponse.writeTo()

    if (bufferedResponse != null)
    {
      logger.warn("The Buffered response should be handled by BufferedResponseRequestHandler");
      // if there is saved response for this URL render it
      bufferedResponse.writeTo((WebResponse)requestCycle.getResponse());
    }
    else if (getRedirectPolicy() == RedirectPolicy.NEVER_REDIRECT ||
      (isOnePassRender() && isAjax == false && getRedirectPolicy() != RedirectPolicy.ALWAYS_REDIRECT) //
      ||
      (!isAjax //
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.DataSourceProvider.writeTo()

                                                                                    null));

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        try {
            dsp.writeTo(bads, null, null, null, MediaType.WILDCARD_TYPE, null, baos);
        } catch (IOException e) {
            assertFalse(" Failed to write Entity", true);
        }

        assertEquals(message, new String(baos.toByteArray()));
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.FormMultivaluedMapProvider.writeTo()

        assertTrue(provider.isWriteable(rawType,
                                        type,
                                        null,
                                        MediaType.APPLICATION_FORM_URLENCODED_TYPE));
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        provider.writeTo(map,
                         rawType,
                         type,
                         null,
                         MediaType.APPLICATION_FORM_URLENCODED_TYPE,
                         null,
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.ReaderProvider.writeTo()

                                                                                   null));

        StringReader reader = new StringReader(message);

        try {
            rp.writeTo(reader, null, null, null, MediaType.WILDCARD_TYPE, null, baos);
        } catch (IOException e) {
            assertFalse(" Failed to write Entity", true);
        }

        assertEquals(message, new String(baos.toByteArray()));
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.atom.AtomFeedProvider.writeTo()

                resource.accept(MediaType.APPLICATION_ATOM_XML_TYPE)
                    .contentType(MediaType.APPLICATION_ATOM_XML_TYPE).post(AtomFeed.class,
                                                                           entryToPost);

            ByteArrayOutputStream os = new ByteArrayOutputStream();
            afp.writeTo(responseEntity,
                        AtomFeed.class,
                        null,
                        null,
                        MediaType.APPLICATION_ATOM_XML_TYPE,
                        null,
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.