1 38 package com.gargoylesoftware.htmlunit; 39 40 import java.io.File ; 41 42 50 public class KeyDataPair extends KeyValuePair { 51 52 private static final long serialVersionUID = -1129314696176851675L; 53 54 private final File fileObject_; 55 private final String contentType_; 56 private final String charset_; 57 58 66 public KeyDataPair( final String key, final File file, final String contentType, 67 final String charset) { 68 69 super(key, file.getName()); 70 71 if (file.exists()) { 72 fileObject_ = file; 73 } 74 else { 75 fileObject_ = null; 76 } 77 78 contentType_ = contentType; 79 charset_ = charset; 80 } 81 82 83 86 public File getFile() { 87 return fileObject_; 88 } 89 90 94 public String getCharset() { 95 return charset_; 96 } 97 98 102 public String getContentType() { 103 return contentType_; 104 } 105 } 106 | Popular Tags |