public RandomAccessTemporaryFileChannel glueFilesTogether( FileFragmentMetaDataStore fileFragmentMetaDataStore, String path) throws FuseException { splittingQueue.set(fileFragmentMetaDataStore); RandomAccessTemporaryFileChannel ret = splittingQueue.get(path); byte[] arr = new byte[6]; try { ret.getChannel().read(ByteBuffer.wrap(arr)); ret.getChannel().position(0); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // System.out.println("CachingStore read:"+new String(arr,0)); return ret; }
@Override public void rename(String from, String to) { splittingQueue.rename(from, to); }
public void remove(String path) { splittingQueue.remove(path); }
public FileFragments splitFile( FileFragmentMetaDataStore fileFragmentMetaDataStore, String path, FileChannel temp) throws FuseException, IOException { splittingQueue.set(fileFragmentMetaDataStore); return splittingQueue.put(path, temp); }