Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.labs64.utils.swid.io;
public class SwidWriter {
    private static final ObjectFactory objectFactory = new ObjectFactory();

    
Write the object into an output stream.

Parameters:
swidTag The SWID Tag object to be written.
output SWID Tag will be added to this stream.
Throws:
com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing.
java.lang.IllegalArgumentException If any of the method parameters are null
    public void write(final SoftwareIdentificationTagComplexType swidTagfinal java.io.OutputStream output) {
        JAXBUtils.writeObject(.createSoftwareIdentificationTag(swidTag), output);
    }

    
Write the object into a file.

Parameters:
swidTag The root of content tree to be written.
file File to be written. If this file already exists, it will be overwritten.
Throws:
com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing.
java.lang.IllegalArgumentException If any of the method parameters are null
    public void write(final SoftwareIdentificationTagComplexType swidTagfinal File file) {
        JAXBUtils.writeObject(.createSoftwareIdentificationTag(swidTag), file);
    }

    
Write the object into a Writer.

Parameters:
swidTag The root of content tree to be written.
writer SWID Tag will be sent to this writer.
Throws:
com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing.
java.lang.IllegalArgumentException If any of the method parameters are null
    public void write(final SoftwareIdentificationTagComplexType swidTagfinal java.io.Writer writer) {
        JAXBUtils.writeObject(.createSoftwareIdentificationTag(swidTag), writer);
    }
New to GrepCode? Check out our FAQ X