congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WriteHandle
Code IndexAdd Tabnine to your IDE (free)

How to use
WriteHandle
in
com.linkedin.entitystream

Best Java code snippets using com.linkedin.entitystream.WriteHandle (Showing top 11 results out of 315)

origin: linkedin/rest.li

@Override
public void onWritePossible()
{
 while (_writeHandle.remaining() > 0)
 {
  if (!_done)
  {
   _done = true;
   _writeHandle.write(_entity);
  }
  else
  {
   _writeHandle.done();
  }
 }
}
origin: com.linkedin.pegasus/data

@Override
public void onWritePossible()
 while (_writeHandle.remaining() > 0)
    _writeHandle.done();
    break;
    _writeHandle.write(_out.getBytes());
   _writeHandle.write(_out.getBytes());
    _writeHandle.error(e);
    break;
origin: linkedin/rest.li

@Override
public void onWritePossible()
{
 _wh.done();
}
origin: com.linkedin.pegasus/r2-core

@Override
public void write(ByteString data)
{
 wh.write(data);
}
origin: com.linkedin.pegasus/r2-core

 @Override
 public int remaining()
 {
  return wh.remaining();
 }
});
origin: com.linkedin.pegasus/r2-core

@Override
public void error(Throwable throwable)
{
 wh.error(throwable);
}
origin: com.linkedin.pegasus/r2-core

@Override
public void done()
{
 wh.done();
}
origin: com.linkedin.pegasus/restli-int-test-server

@Override
public void onWritePossible()
{
 _wh.error(new RestLiResponseDataException("Failed to read data"));
}
origin: linkedin/rest.li

@Override
public void onWritePossible()
{
 while (_writeHandle.remaining() > 0)
 {
  if (_offset < _bytes.length)
  {
   int length = Math.min(_chunkSize, _bytes.length - _offset);
   ByteString chunk = ByteString.copy(_bytes, _offset, length);
   _offset += length;
   _writeHandle.write(chunk);
  }
  else
  {
   _writeHandle.done();
  }
 }
}
origin: com.linkedin.pegasus/data

@Override
public void onInit(WriteHandle<? super ByteString> wh)
{
 _writeHandle = wh;
 try
 {
  _generator = _jsonFactory.createGenerator(_out);
  if (_typeStack.peek() == MAP)
  {
   _generator.writeStartObject();
  }
  else
  {
   _generator.writeStartArray();
  }
 }
 catch (IOException e)
 {
  _writeHandle.error(e);
 }
}
origin: com.linkedin.pegasus/restli-server

@Override
public void onWritePossible()
{
 if (_wh.remaining() > 0)
 {
  _wh.write(ByteString.unsafeWrap(_out.toByteArray()));
  _wh.done();
 }
}
com.linkedin.entitystreamWriteHandle

Javadoc

This is the handle for the Writer to write data to an EntityStream. The Writer should invoke the methods #remaining, #write, #done and #error in a thread-safe manner.

Most used methods

  • done
  • remaining
  • write
  • error

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Permission (java.security)
    Legacy security code; do not use.
  • Collectors (java.util.stream)
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Reference (javax.naming)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now