opendap/src/main/java/opendap/dap/BytePrimitiveVector.java
public void externalize(DataOutputStream sink) throws IOException {
        int modFour = vals.length % 4;
        // number of bytes to pad
        int pad = (modFour != 0) ? (4 - modFour) : 0;

        for (int i = 0; i < vals.length; i++) {
            sink.writeByte(vals[i]);
        }
        // pad out to a multiple of four bytes
        for (int i = 0; i < pad; i++)
            sink.writeByte(0);
    }
public void externalize(DataOutputStream sink) throws IOException {
        int modFour = vals.length % 4;
        // number of bytes to pad
        int pad = (modFour != 0) ? (4 - modFour) : 0;

        for (int i = 0; i < vals.length; i++) {
            sink.writeByte(vals[i]);
        }
        // pad out to a multiple of four bytes
        for (int i = 0; i < pad; i++)
            sink.writeByte(0);
    }
public void externalize ( DataOutputStream sink ) throws IOException { int modFour = vals . length % 4 ; // number of bytes to pad
 int pad = ( modFour != 0 ) ? ( 4 - modFour ) : 0 ; for ( int i = 0 ; i < vals . length ; i ++ ) { sink . writeByte ( vals [ i ] ) ; } // pad out to a multiple of four bytes
 for ( int i = 0 ; i < pad ; i ++ ) sink . writeByte ( 0 ) ; }
Writes data to a <code>DataOutputStream</code>. This method is used
primarily by GUI clients which need to download OPeNDAP data, manipulate
it, and then re-save it as a binary file.

@param sink a <code>DataOutputStream</code> to write to.
@throws IOException thrown on any <code>OutputStream</code>
exception.
Writes data to a <code > DataOutputStream< / code > . This method is used primarily by GUI clients which need to download OPeNDAP data manipulate it and then re - save it as a binary file .