Examples of writeHeader()


Examples of org.apache.hadoop.util.DataChecksum.writeHeader()

      // Create a summer and write out its header.
      int bytesPerChecksum = conf.getInt("io.bytes.per.checksum", 512);
      DataChecksum sum =
        DataChecksum.newDataChecksum(DataChecksum.CHECKSUM_CRC32,
                                     bytesPerChecksum);
      sum.writeHeader(mdOut);
     
      // Buffer to read in a chunk of data.
      byte[] buf = new byte[bytesPerChecksum];
      // Buffer to store the checksum bytes.
      byte[] chk = new byte[sum.getChecksumSize()];
View Full Code Here

Examples of org.apache.hadoop.util.DataChecksum.writeHeader()

      // Create a summer and write out its header.
      int bytesPerChecksum = conf.getInt("io.bytes.per.checksum", 512);
      DataChecksum sum =
        DataChecksum.newDataChecksum(DataChecksum.CHECKSUM_CRC32,
                                     bytesPerChecksum);
      sum.writeHeader(mdOut);
     
      // Buffer to read in a chunk of data.
      byte[] buf = new byte[bytesPerChecksum];
      // Buffer to store the checksum bytes.
      byte[] chk = new byte[sum.getChecksumSize()];
View Full Code Here

Examples of org.apache.hadoop.util.DataChecksum.writeHeader()

      // Create a summer and write out its header.
      int bytesPerChecksum = conf.getInt("io.bytes.per.checksum", 512);
      DataChecksum sum =
        DataChecksum.newDataChecksum(DataChecksum.CHECKSUM_CRC32,
                                     bytesPerChecksum);
      sum.writeHeader(mdOut);
     
      // Buffer to read in a chunk of data.
      byte[] buf = new byte[bytesPerChecksum];
      // Buffer to store the checksum bytes.
      byte[] chk = new byte[sum.getChecksumSize()];
View Full Code Here

Examples of org.apache.james.mime4j.message.DefaultMessageWriter.writeHeader()

        assertEquals(SWISS_GERMAN_HELLO, field.getBody());

        ByteArrayOutputStream outstream = new ByteArrayOutputStream();

        DefaultMessageWriter writer = new DefaultMessageWriter();
        writer.writeHeader(header, outstream);
        byte[] b = outstream.toByteArray();
        ByteArrayBuffer buf = new ByteArrayBuffer(b.length);
        buf.append(b, 0, b.length);
        String s = ContentUtil.decode(buf);
View Full Code Here

Examples of org.broadinstitute.gatk.engine.io.stubs.SAMFileWriterStub.writeHeader()

    /**
     *  As {@link #createSAMFileWriter(String, org.broadinstitute.gatk.engine.GenomeAnalysisEngine)}, but also sets the header
     */
    public static SAMFileWriter createSAMFileWriter(final String file, final GenomeAnalysisEngine engine, final SAMFileHeader header) {
        final SAMFileWriterStub output = (SAMFileWriterStub) createSAMFileWriter(file, engine);
        output.writeHeader(header);
        return output;
    }

    /**
     * is this base inside the adaptor of the read?
View Full Code Here

Examples of org.dcm4che3.io.DicomOutputStream.writeHeader()

        @SuppressWarnings("resource")
        DicomOutputStream dout = new DicomOutputStream(out,
                bigEndian ? UID.ExplicitVRBigEndianRetired
                          : UID.ExplicitVRLittleEndian);
        dout.writeDataset(null, this);
        dout.writeHeader(Tag.ItemDelimitationItem, null, 0);
    }

    private void readObject(ObjectInputStream in)
            throws IOException, ClassNotFoundException {
        in.defaultReadObject();
View Full Code Here

Examples of org.dcm4che3.io.DicomOutputStream.writeHeader()

            attrs.setDate(Tag.InstanceCreationDate, VR.DA, now);
            attrs.setDate(Tag.InstanceCreationTime, VR.TM, now);
            Attributes fmi = attrs.createFileMetaInformation(transferSyntax);
            DicomOutputStream dos = new DicomOutputStream(dcmFile);
            try {
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeHeader(Tag.AcquisitionContextSequence, VR.SQ, -1);
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeDataset(fmi, attrs);
                dos.writeHeader(Tag.PixelData, VR.OB, -1);
                if (!cl.hasOption("mpeg")) {
View Full Code Here

Examples of org.dcm4che3.io.DicomOutputStream.writeHeader()

            attrs.setDate(Tag.InstanceCreationTime, VR.TM, now);
            Attributes fmi = attrs.createFileMetaInformation(transferSyntax);
            DicomOutputStream dos = new DicomOutputStream(dcmFile);
            try {
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeHeader(Tag.AcquisitionContextSequence, VR.SQ, -1);
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeDataset(fmi, attrs);
                dos.writeHeader(Tag.PixelData, VR.OB, -1);
                if (!cl.hasOption("mpeg")) {
                    dos.writeHeader(Tag.Item, null, 0);
View Full Code Here

Examples of org.dcm4che3.io.DicomOutputStream.writeHeader()

            Attributes fmi = attrs.createFileMetaInformation(transferSyntax);
            DicomOutputStream dos = new DicomOutputStream(dcmFile);
            try {
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeHeader(Tag.AcquisitionContextSequence, VR.SQ, -1);
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeDataset(fmi, attrs);
                dos.writeHeader(Tag.PixelData, VR.OB, -1);
                if (!cl.hasOption("mpeg")) {
                    dos.writeHeader(Tag.Item, null, 0);
                    dos.writeHeader(Tag.Item, null, (jpgLen + 1) & ~1);
View Full Code Here

Examples of org.dcm4che3.io.DicomOutputStream.writeHeader()

            try {
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeHeader(Tag.AcquisitionContextSequence, VR.SQ, -1);
                dos.writeHeader(Tag.SequenceDelimitationItem, null, 0);
                dos.writeDataset(fmi, attrs);
                dos.writeHeader(Tag.PixelData, VR.OB, -1);
                if (!cl.hasOption("mpeg")) {
                    dos.writeHeader(Tag.Item, null, 0);
                    dos.writeHeader(Tag.Item, null, (jpgLen + 1) & ~1);
                    dos.write(buffer, 0, jpgHeaderLen);
                }
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.