Package gotnames.dm

Examples of gotnames.dm.ProfilePicture


        usersOut.flush();
        zo.closeEntry();
       
        // Write profile pictures
        for (User u : users) {
          ProfilePicture pp = profilePictureByUserKey.get(u.getKey());
          if (pp != null) {
            zo.putNextEntry(new ZipEntry(u.getFullName() + ".jpg"));
            IOUtils.copy(new ByteArrayInputStream(pp.getPicture().getBytes()), zo);
            zo.closeEntry();
          }
        }
        zo.close();
      }
View Full Code Here


   
    Query query = pm.newQuery(ProfilePicture.class);
    query.setFilter("md5 == fieldParam");
    query.declareParameters("String fieldParam");
    query.setRange(0, 1);
    ProfilePicture pp = CollUtils.getOneOrNull(Utils.<Collection<ProfilePicture>>cast(query.execute(pictureMd5)));
   
    if (pp == null)
      throw new IllegalArgumentException("Invalid token");
   
    final byte[] image = pp.getPicture().getBytes();
     
    return new BinaryDataPostAction() {
      @Override protected boolean isCacheForever() {
        return true;
      }
View Full Code Here

TOP

Related Classes of gotnames.dm.ProfilePicture

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.