Coverage Report - org.mule.transport.http.multipart.PartDataSource
 
Classes in this File Line Coverage Branch Coverage Complexity
PartDataSource
0%
0/8
N/A
1.167
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.transport.http.multipart;
 8  
 
 9  
 import java.io.IOException;
 10  
 import java.io.InputStream;
 11  
 import java.io.OutputStream;
 12  
 
 13  
 import javax.activation.DataSource;
 14  
 
 15  
 /**
 16  
  * TODO
 17  
  */
 18  
 public class PartDataSource implements DataSource
 19  
 {
 20  
     private Part part;
 21  
 
 22  
     public PartDataSource(Part part)
 23  0
     {
 24  0
         this.part = part;
 25  0
     }
 26  
 
 27  
     public InputStream getInputStream() throws IOException
 28  
     {
 29  0
         return part.getInputStream();
 30  
     }
 31  
 
 32  
     public OutputStream getOutputStream() throws IOException
 33  
     {
 34  0
         throw new UnsupportedOperationException("getOutputStream");
 35  
     }
 36  
 
 37  
     public String getContentType()
 38  
     {
 39  0
         return part.getContentType();
 40  
     }
 41  
 
 42  
     public String getName()
 43  
     {
 44  0
         return part.getName();
 45  
     }
 46  
 
 47  
     public Part getPart()
 48  
     {
 49  0
         return part;
 50  
     }
 51  
 }