code: private byte[] getLinkContent() throws IOException
     {
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  
        byte[] firstItem = getFirstItem();
        writeInt(firstItem.length + 2, outStream);
        writeBytes(firstItem, outStream);
  
        byte[] lastItem = getLastItem();
        writeInt(lastItem.length + 2, outStream);
        writeBytes(lastItem, outStream);
  
        String[] pathes = servletPath.split("/");
        String root = pathes[pathes.length - 1];
  
        byte[] rootItem = getRootItem(root, servletPath);
        writeInt(rootItem.length + 2, outStream);
        writeBytes(rootItem, outStream);
  
        pathes = targetPath.split("/");
        StringBuilder curHref = new StringBuilder(servletPath);
  
        for (int i = 0; i < pathes.length; i++)
        {
           if ("".equals(pathes[i]))
           {
              continue;
           }
           String curName = pathes[i];
           curHref.append("/").append(curName);
  
           if (i < pathes.length - 1)
           {
              byte[] linkItem = getHreffedFolder(curName, curHref.toString());
              writeInt(linkItem.length + 2, outStream);
              writeBytes(linkItem, outStream);
           }
           else
           {
              byte[] linkFile = getHreffedFile(curName, curHref.toString());
              writeInt(linkFile.length + 2, outStream);
              writeBytes(linkFile, outStream);
           }
  
        }
  
        return outStream.toByteArray();
     }
docs: Gets the content of the link.
  
  @return link content
  @throws IOException {@link IOException}