Package net.sourceforge.cardme.vcard.exceptions

Examples of net.sourceforge.cardme.vcard.exceptions.VCardBuildException


         
          sb.append(foldedLabelLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("LabelType ("+VCardTypeName.LABEL.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("LabelType ("+VCardTypeName.LABEL.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here


         
          sb.append(foldedTelephoneLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("TelType ("+VCardTypeName.TEL.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("TelType ("+VCardTypeName.TEL.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedEmailLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("EmailType ("+VCardTypeName.EMAIL.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("EmailType ("+VCardTypeName.EMAIL.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedNoteLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("NoteType ("+VCardTypeName.NOTE.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("NoteType ("+VCardTypeName.NOTE.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedNicknameLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("NicknameType ("+VCardTypeName.NICKNAME.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("NicknameType ("+VCardTypeName.NICKNAME.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedCategoryLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("CategoriesType ("+VCardTypeName.CATEGORIES.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("CategoriesType ("+VCardTypeName.CATEGORIES.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedClassLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("ClassType ("+VCardTypeName.CLASS.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("ClassType ("+VCardTypeName.CLASS.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedProductIdLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("ProdIdType ("+VCardTypeName.PRODID.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("ProdIdType ("+VCardTypeName.PRODID.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

         
          sb.append(foldedSortStringLine);
          sb.append(eol);
        }
        else {
          throw new VCardBuildException("SortStringType ("+VCardTypeName.SORT_STRING.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("SortStringType ("+VCardTypeName.SORT_STRING.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

                  else {
                    b64str = Base64Wrapper.encode(keyBytes, Base64Wrapper.OPTIONS.NO_COMPRESSION);
                  }
                }
                catch(Exception ex) {
                  throw new VCardBuildException(ex.getMessage(), ex);
                }
              }
              else {
                b64str = new String(keyBytes);
              }
             
              String tmpKeyLine = tmpSb.toString();
              String foldedKeyLine2 = VCardUtils.foldLine(tmpKeyLine, eol, binaryFoldingScheme);
             
              foldedKeyLine = VCardUtils.foldLine(b64str, eol, binaryFoldingScheme);
              sb.append(foldedKeyLine2);      //Type declaration with param types
              sb.append(eol);          //Distinctive line break
              sb.append(binaryFoldingScheme.getIndent())//Indent first line
              break;
            }
           
            case EVOLUTION:
            case KDE_ADDRESS_BOOK:
            case RFC2426:
            case I_PHONE:
            {
              byte[] keyBytes = keyType.getKey();
              if(binary) {
                try {
                  if(keyType.isCompressed()) {
                    tmpSb.append(Base64Wrapper.encode(keyBytes, Base64Wrapper.OPTIONS.GZIP_COMPRESSION));
                  }
                  else {
                    tmpSb.append(Base64Wrapper.encode(keyBytes, Base64Wrapper.OPTIONS.NO_COMPRESSION));
                  }
                }
                catch(Exception ex) {
                  throw new VCardBuildException(ex.getMessage(), ex);
                }
              }
              else {
                tmpSb.append(new String(keyBytes));
              }
             
              String tmpKeyLine = tmpSb.toString();
              foldedKeyLine = VCardUtils.foldLine(tmpKeyLine, eol, binaryFoldingScheme);
              break;
            }
          }
         
          sb.append(foldedKeyLine);
         
          switch(compatMode)
          {
            case MS_OUTLOOK:
            {
              sb.append(eol);
              sb.append(eol);
              break;
            }
             
            case RFC2426:
            case EVOLUTION:
            case KDE_ADDRESS_BOOK:
            case I_PHONE:
            case MAC_ADDRESS_BOOK:
            {
              sb.append(eol);
              break;
            }
          }
        }
        else {
          throw new VCardBuildException("KeyType ("+VCardTypeName.KEY.getType()+") exists but is empty.");
        }
      }
    }
    catch(Exception ex) {
      throw new VCardBuildException("KeyType ("+VCardTypeName.KEY.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.cardme.vcard.exceptions.VCardBuildException

Copyright © 2018 www.massapicom. 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.